Random looks of enemies

Talk about Severance Blade of Darkness modifications and maps here. No tips or tech support questions please, use the forum above. Note that the game is rated 18 so some content may be unsuitable for younger readers.

Moderators: prospero, Ade

User avatar
IrateGiant
Dragon
Posts: 328
Joined: Fri Jan 08, 2010 12:35 pm
Location: Spain
Contact:

Postby IrateGiant » Thu Jan 20, 2011 8:49 pm

Hi Fynjy! This is a great idea!, and i remember that charly was working on this with his SkinPack3 [:)]

This's a slowly work because is necessary to create copys of .BOD files and edit with a hex-editor, and also create the new skins.

This topic contain the info [;)]

http://www.arokhslair.net/forum/topic.a ... hichpage=7

User avatar
prospero
Ancient Dragon
Posts: 1726
Joined: Wed Nov 21, 2001 1:42 am
Location: United Kingdom

Postby prospero » Fri Jan 21, 2011 11:42 am

Hi Fynjy [:)]

I have done maps with lots of various civilian models taken from the Neverwinter Nights game. These are different to RAS models in that they have seperate body parts which can be switched about and swapped. Also, practically endless variations in textures can be achieved very easily. But I find there is a limit to the amount of textures the game can cope with before you start losing textures. Maybe a memory thing - not sure. But I'd say about 30 is getting near the max. Of course you can make sets of chars that share the same textures which gives a bit more scope.

As IG says, it's quite possible to make lots of Orc skins and create new .BOD files to hang them on. You can't alter the actual mesh of the model like you can a brand char made in 3DSmax. Although if Harrison figures out how to reverse-engineer the texture mapping coords, that too will be a reality.

btw. There are two unused orc skins already loaded in the game. The Dark_Ork and Gold_Ork. Same mesh, different colours. Unfortunately, The RAS models won't use the NWN meshes.

Sir Random
Dragon
Posts: 737
Joined: Thu Nov 15, 2001 12:58 am
Location: Ireland
Contact:

Postby Sir Random » Fri Jan 21, 2011 8:04 pm

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by Fynjy</i>
...for example in games where there are NPCs there are usually several skins or even models for the random people in the street. In BOD, only the fellow dwarves are sort of different.<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">Yeah, I know what you mean. It's hard to create any sort of town/village community without people to inhabit it. It wouldn't take much to give a town atmosphere, a blacksmith hammering, a woodcutter sawing logs, a few people just standing around. I know there are lots of NWN chars, but imho they look a bit too 'civilised' for the BoD world. I would really like to see some NPC skins for the Knight, Barb and Amazon models. [:)]


<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by prospero</i>
But I find there is a limit to the amount of textures the game can cope with before you start losing textures. Maybe a memory thing - not sure. But I'd say about 30 is getting near the max.<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">That's interesting, does the texture problem occur when 30 different chars are on screen, or will just preloading the 30 textures cause the problem?

I've been wondering about game texture limits, I now have 124 textures in my mod, and I've noticed that OpenGL viewer seems to crash more frequently. [:(]

Sir Random
Dragon
Posts: 737
Joined: Thu Nov 15, 2001 12:58 am
Location: Ireland
Contact:

Postby Sir Random » Sat Jan 22, 2011 3:16 am

You would need to add some code to every map in the game where you want random orcs.

To load the textures, add these two lines to the .lvl file (MAPNAME.lvl)

Bitmaps -> ..\..\3dChars\dork.mmp
Bitmaps -> ..\..\3dChars\Org.mmp


Then add these lines to the end of the 'Enemigos.py' file:

Code: Select all

import whrandom EntList=range(Bladex.nEntities()) for i in EntList: Ent=Bladex.GetEntity(i) if Ent.Kind=="Ork": rnd=whrandom.randint(0,3) if rnd==2: print Ent.Name+" converted to Gold Ork" Ent.SetMesh("Gold_Ork") elif rnd==1: print Ent.Name+" converted to Dark Ork" Ent.SetMesh("Dark_Ork")
That should give you a random scattering of Gold and Dark orcs in the map.

User avatar
prospero
Ancient Dragon
Posts: 1726
Joined: Wed Nov 21, 2001 1:42 am
Location: United Kingdom

Postby prospero » Sat Jan 22, 2011 9:31 am

Another way is to modify the Ork class in Scripts/EnemyTypes.py

This will give a purely random pick for all Orks in every map.
*You still need the load the textures as per SR's instructions.


Add the section between the ########### s

Code: Select all

class Ork (Enm_Def.NPCPerson): def __init__(self, me): # base class init Enm_Def.NPCPerson.__init__(self, me) # anims me.AnmTranFunc=AuxTran.AuxTranOrc # Set up orc specific sound priorities self.SoundPriorities[Reference.SND_ARROW] = 10.0 self.SoundPriorities[Reference.SND_HIT] = 50.0 self.SoundPriorities[Reference.SND_NPC] = 25.0 self.SoundPriorities[Reference.SND_NOISYPC] = 30.0 self.SoundPriorities[Reference.SND_PC] = 80.0 def ResetSounds(self, EntityName): me=Bladex.GetEntity(EntityName) if me.Kind=="Ork": AniSound.AsignarSonidosOrco(EntityName) ######################################### new bit skins = ("Gold_Ork", "Dark_Ork", "Ork") idx = whrandom.randint(0, len(skins)-1) me.MeshName = skins[idx] ######################################### end of new bit elif me.Kind=="Great_Ork": AniSound.AsignarSonidosOrcoGrande(EntityName) elif me.Kind=="Dark_Ork": AniSound.AsignarSonidosOrcoOscuro(EntityName) # Functions for loading and saving state def __getstate__(self): # Tiene que devolver cómo poder guardar el estado de la clase NPCPerson_state=Enm_Def.NPCPerson.__getstate__(self) if(NPCPerson_state[0]!=1): print "ERROR: Ork.__getstate__(): Base class version differs." # Throw? return NPCPerson_state NPCPerson_state[1]["Ork"]=() return NPCPerson_state #self.ResetCombat(me.Name) def __setstate__(self,parm): # Toma como parámetro lo que devuelve __getstate__() y debe recrear la clase Enm_Def.NPCPerson.__setstate__(self,parm) version=parm[0] if version==1: parms=parm[1]["Ork"] #self.SoundPriorities=parms[0] me=Bladex.GetEntity(self.Name) me.AnmTranFunc=AuxTran.AuxTranOrc def ResetCombat (self,EntityName): Enm_Def.NPCPerson.ResetCombat(self, EntityName) me = Bladex.GetEntity(EntityName) if me and me.Life>0: me.BlockingPropensity = 0.2 me.AttackList = BCopy.deepcopy(Combat.OrkAttackData) self.ChanceOfFuryOnHurt = 0.45


Haven't tried it btw. [:I]

I think it would be possible to alter the resistances for the gold and dark orks so they were a bit tougher. I think this was the original intention.

User avatar
prospero
Ancient Dragon
Posts: 1726
Joined: Wed Nov 21, 2001 1:42 am
Location: United Kingdom

Postby prospero » Fri Jul 08, 2011 6:57 pm

It's:

"Bar<font color="red">S</font id="red">kin1" and "Amz<font color="red">S</font id="red">kin1" [:D]

You have to watch the case with these mesh names. The 'proper' mesh names are not necsessarily the name of the .BOD file.

Sir Random
Dragon
Posts: 737
Joined: Thu Nov 15, 2001 12:58 am
Location: Ireland
Contact:

Postby Sir Random » Fri Jul 08, 2011 7:04 pm

Hi Fynjy,

In your first attempt:
player.SetMesh("Barskin1") or .SetMesh("Amzskin1")
You are using the EXTERNAL names 'Barskin1' & 'Amzskin1', but you need the INTERNAL names: Bar<font color="green">S</font id="green">kin1 or Amz<font color="green">S</font id="green">kin1

You will need to load the textures too, Amzskin1.mmp, Barskin1.mmp

EDIT\
Oops, beaten to it [:)]

Sir Random
Dragon
Posts: 737
Joined: Thu Nov 15, 2001 12:58 am
Location: Ireland
Contact:

Postby Sir Random » Fri Jul 08, 2011 8:19 pm

I think most mesh names are the same as the BOD name, just some are different (like the multiplayer skins). You can check the mesh name by opening the BOD file with a hex editor. The mesh name is at the beginning of the file, so you don't have to search for it.

charly
Dragon
Posts: 152
Joined: Wed Oct 22, 2008 10:52 am
Location: Hungary

Postby charly » Tue Jul 12, 2011 9:46 am

looks elseone found boring that the enemies are the same :D

I use setmesh code for making more skin enemies NPC is good because one mmp got 3 skin in it :)

I made 2 great ork mesh adn its cool that different great orcs come, and the 3rd is the cheef with another skin :)

I show some pictures soon :)

charly
Dragon
Posts: 152
Joined: Wed Oct 22, 2008 10:52 am
Location: Hungary

Postby charly » Tue Jul 12, 2011 2:19 pm

ImageImage


Return to “Severance BoD: Modding Community”

Who is online

Users browsing this forum: No registered users and 5 guests