Circle of Eight Forum

Go Back   Circle of Eight Forum > ToEE Modding > ToEE Toolset Project Documentation
User Name
Password
Register FAQ Members List Calendar JavaChat Mark Forums Read

Reply
 
Thread Tools
Old July 2nd, 2005   #1
Shiningted
Lay off the junk son
 
Shiningted's Avatar
 
Join Date: Oct 2004
Location: Sydney
Posts: 9,149
Well whaddya know?

Ok this is meant to be a thread like the one Gaear started for fixing known issues: this one is for things we discover while modding that others may not realise. Just cool little things or things that aren't obviously apparent. Since so many of us are modding in such different directions (weapons, spells, clothes, bardic instruments, feats, skills, dialogue etc) we could quickly build quite a little archive.

Lets use this sensibly and no debating things: just post what you know. If someone posts something grossly wrong, PM them so they can test it and fix it, don't argue the toss on here.

Hope people find this useful and I don't just post a couple things everyone knows
Shiningted is offline   Reply With Quote
Old July 2nd, 2005   #2
Shiningted
Lay off the junk son
 
Shiningted's Avatar
 
Join Date: Oct 2004
Location: Sydney
Posts: 9,149
Re: Well whaddya know?

Fact: If you want a creature to attack on sight, add ONF_KOS (kill-on-sight?) in col 152 of the protos. Alternately, if you create a new monster by copying an existing one but don't want it to attack on sight, make sure this flag isn't there.
Shiningted is offline   Reply With Quote
Old July 2nd, 2005   #3
Shiningted
Lay off the junk son
 
Shiningted's Avatar
 
Join Date: Oct 2004
Location: Sydney
Posts: 9,149
Re: Well whaddya know?

Fact: you can create visual effects right in the dialogue file, you don't need to script them in the .py file or import utilities or such. For instance, if you wanted to have an NPC suddenly explode like a fireball, you might have:

{100}{You make me so angry, Player 1, I feel I am gonna explode!!!}{You make me so angry, Player 1, I feel I am gonna explode!!!}{}{}{}{game.particles( 'sp-Fireball-Hit', npc )}

Edit - just noticed Liv used this in one of the Lareth dlgs, along with a couple other things I thought i had 'discovered'. Always 2 steps ahead

Last edited by Shiningted; July 20th, 2005 at 07:25 AM.
Shiningted is offline   Reply With Quote
Old July 10th, 2005   #4
darmagon
stumbler in the dark
 
darmagon's Avatar
 
Join Date: Mar 2005
Posts: 295
Re: Well whaddya know?

fact: in the game console you can use the following sequence of commands to write a file of the functions available for a certain object:

Code:
f = open('filename.txt', 'w')
f.write(str(dir(obj)))
f.close()
where 'filename.txt' is the name of the file you want to write to.
obj is the name of the object you want to know about (ie. game or game.party[0] etc.)

the quotes around the names must be included as above in the code section. after each line you need to hit the enter key.

The file will show up in the 'modules\ToEE' directory under your main Temple of Elemental Evil install directory.

Darmagon
darmagon is offline   Reply With Quote
Old July 14th, 2005   #5
Cujo
Mad Hatter
 
Cujo's Avatar
 
Join Date: Apr 2005
Location: Saurfang
Posts: 3,480
Re: Well whaddya know?

what I know and want to know;
the only differences between a human male and an elf male in the protos, is model size, race_*, protrait pic# and subtype.

so how does it know to put the elf skin onto an elf, it uses the human male's model, if its because of the race subtype is there a list anywhere (and can it be added to). I've come to the conclusion that the humanoid models have some code so that they can wear different skins, unlike other models which don't change clothes. If the male elf didn't use the male humans model I'd probly would be wondering some thing else (the halfling and gnomes also use the humans model)
__________________
“Scientists are saying the future is going to be far more futuristic than they originally predicted.”
I killed two dwarves in the morning. I killed two dwarves at night
I killed two dwarves in the afternoon, and then I feel alright
I killed two dwarves in times of peace and two in times of war
I killed two dwarves before I killed two dwarves
And then I killed two more

Super Moderator
011101110110100101101110001000000110000100100000
011000110110111101101111011010110110100101100101

Last edited by Cujo; July 15th, 2005 at 02:33 AM.
Cujo is offline   Reply With Quote
Old July 16th, 2005   #6
Shiningted
Lay off the junk son
 
Shiningted's Avatar
 
Join Date: Oct 2004
Location: Sydney
Posts: 9,149
Re: Well whaddya know?

Theory (heavily tested): To check if it is night, you seem to have to use the script
is_daytime() != 1

rather than

is_nighttime() == 1
Shiningted is offline   Reply With Quote
Old July 16th, 2005   #7
Shiningted
Lay off the junk son
 
Shiningted's Avatar
 
Join Date: Oct 2004
Location: Sydney
Posts: 9,149
Re: Well whaddya know?

Fact: to add a random encounter, first you have to script it in whatever triggers it. For instance, Thrommel's reward is triggered by the script
schedule_reward(npc,pc)

which is defined as follows:

Quote:
def schedule_reward( attachee, triggerer ):
_______ game.global_flags[152] = 1
_______ game.timevent_add( give_reward, (), 1209600000 )
_______ return RUN_DEFAULT
Note the time thing: if you don't want to wait for ages, put in a lower number (2000 works for me!)

Now, give_reward is defined as follows:

Quote:
def give_reward():
_______ game.encounter_queue.append(3001)
_______ return RUN_DEFAULT
This is the moneyshot. Note 3001: that is the number that will turn up in the random_encounter.py file. Pop this now and look for the bit that says:

def check_predetermined_encounter( setup, encounter ):

Underneath you will see a series of id #'s for random encouters (rewards by and large, I suspect): 3000, 3001, 3002, 3003, and whatever else has since been added. So, put your id number in there, with a script to spawn the desired 'enemy', and a matching id # back in the def give_reward script of whatever is triggering your encounter.

But don't touch 3010. Thats MINE. MINE YOU HERE ME!??!?

And don't touch 3011 or 3012 either, they're Cujo's. He bites, you know.

EDIT: Lets not overuse this, btw: sometimes you just wanna walk to Nulb!
Shiningted is offline   Reply With Quote
Old July 20th, 2005   #8
Cujo
Mad Hatter
 
Cujo's Avatar
 
Join Date: Apr 2005
Location: Saurfang
Posts: 3,480
Re: Well whaddya know?

protos.tab looks for meshes.mes in the model colum*
protos.tab looks for materials.mes in the colour colum**
protos.tab looks for addmesh.mes in the colour colum**

meshes.mes line example
{12166}{armor\gladiator\gladiator_armor_ground}
its looking for file, gladiator_armor_ground***
12166 is the model number in the protos for this example

materials.mes line example
{14300}{CHEST:art\meshes\armor\gladiator\gladiator _male_hu.mdf}
its looking for file, gladiator_male_hu.mdf***

gladiator_male_hu.mdf looks for/contains this text...
Textured
Texture "art/meshes/armor/gladiator/gladiator_male_hu.tga"

addmesh.mes line example
{14300}{art\meshes\armor\gladiator\gladiator_M_hum an_addm.SKM}
its looking for file, gladiator_M_human_addm.SKM***
14300 is the colour number for this example

*found in data/art/meshes
**found in data/rules -the clothings in this have to have matching sets of numbers
***found in data/art/meshes/armor/gladiator
__________________
“Scientists are saying the future is going to be far more futuristic than they originally predicted.”
I killed two dwarves in the morning. I killed two dwarves at night
I killed two dwarves in the afternoon, and then I feel alright
I killed two dwarves in times of peace and two in times of war
I killed two dwarves before I killed two dwarves
And then I killed two more

Super Moderator
011101110110100101101110001000000110000100100000
011000110110111101101111011010110110100101100101
Cujo is offline   Reply With Quote
Old August 17th, 2005   #9
Cujo
Mad Hatter
 
Cujo's Avatar
 
Join Date: Apr 2005
Location: Saurfang
Posts: 3,480
Re: Well whaddya know?

Hey I just had an idea. I know how to make elmo stop swaying perminently (just change his model number from 503 to 100) now If anyone knows how darley changes, then you could do the same thing with elmo to have him swaying when out of your party untill you hire him.

have I explained that very well?
__________________
“Scientists are saying the future is going to be far more futuristic than they originally predicted.”
I killed two dwarves in the morning. I killed two dwarves at night
I killed two dwarves in the afternoon, and then I feel alright
I killed two dwarves in times of peace and two in times of war
I killed two dwarves before I killed two dwarves
And then I killed two more

Super Moderator
011101110110100101101110001000000110000100100000
011000110110111101101111011010110110100101100101
Cujo is offline   Reply With Quote
Old August 17th, 2005   #10
Agetian
Attorney General
 
Agetian's Avatar
 
Join Date: Aug 2004
Posts: 1,794
Re: Well whaddya know?

Fact: you can assign standpoints to creatures when they are first created with a heartbeat script, using the commands:

attachee.standpoint_set(STANDPOINT_DAY, ***)
attachee.standpoint_set(STANDPOINT_NIGHT, ***)

Where "***" should be replaced with a number from jumppoint.tab corresponding to a jump point that is to be used as a creature's standpoint.

Note that the MOB way of scripting standpoints works, but I can't yet find out how to make the creature change maps on standpoint change (e.g. go from a map to another map if the standpoint requires to do that), so if you want that effect you can script it.

- Agetian
Agetian is offline   Reply With Quote
Old September 11th, 2005   #11
Agetian
Attorney General
 
Agetian's Avatar
 
Join Date: Aug 2004
Posts: 1,794
Making scripts run only once without global flags

Here's a nifty way to make the scripts run only once without having to waste a global flag or a global variable to check whether it has already been run. Say, we want a certain heartbeat script to run only once. Then we do:

Code:
def san_heartbeat ( attachee, triggerer ):
          .......                      # our code here

          game.new_sid = 0
          return RUN_DEFAULT
By using game.new_sid=0 we disable the script and prevent it from running further.
Hope this helps.

- Agetian
Agetian is offline   Reply With Quote
Old December 3rd, 2005   #12
Shiningted
Lay off the junk son
 
Shiningted's Avatar
 
Join Date: Oct 2004
Location: Sydney
Posts: 9,149
Re: Well whaddya know?

May as well bump this, some useful stuff here.

Apparent Fact: To keep sectored doors (ie internal doors, not passage icons) RE-appearing on maps without the map having a total conniption, the 'provides cover', 'radius' and '3d render height' flags have to be set, with appropriate values.

EDIT: This is wrong, sorry: it was a problem that was sorted by, errr, Sector Sort.

Last edited by Shiningted; December 8th, 2006 at 10:08 PM.
Shiningted is offline   Reply With Quote
Old December 15th, 2005   #13
Shiningted
Lay off the junk son
 
Shiningted's Avatar
 
Join Date: Oct 2004
Location: Sydney
Posts: 9,149
Re: Well whaddya know?

OCF_SLEEPING seems to do very little - it appears to be similar to 'mute', in that it causes the NPC to not respond to being 'clicked' on, though s/he continues to stand there as normal. Certainly the NPC does not fall to the floor asleep.

OCF_PARALYZED causes the NPC to freeze, like a model in a far away sector (think the Hommlet map, if u r at one end and you scroll over to the other, you will see Burne's Badgers etc standing around frozen, they don't start to move til u enter their sector). If u freeze a character will they are unconscious (<0 HP) they will remain frozen on the ground even if brought back to >0 HP.
Shiningted is offline   Reply With Quote
Old December 17th, 2005   #14
darmagon
stumbler in the dark
 
darmagon's Avatar
 
Join Date: Mar 2005
Posts: 295
Lightbulb Re: Well whaddya know?

Quote:
Originally Posted by Shiningted
OCF_SLEEPING seems to do very little - it appears to be similar to 'mute', in that it causes the NPC to not respond to being 'clicked' on, though s/he continues to stand there as normal. Certainly the NPC does not fall to the floor asleep..
Au contraire, Shiningted, OCF_SLEEPING does exactly what I need it to to disallow dialog in the spell Time Stop. Thanks, I hadn't even thought of it .

Darmagon
darmagon is offline   Reply With Quote
Old December 30th, 2005   #15
Shiningted
Lay off the junk son
 
Shiningted's Avatar
 
Join Date: Oct 2004
Location: Sydney
Posts: 9,149
Re: Well whaddya know?

Fact: Deleting things from the protos.tab will cause the game to CTD!

By this, I mean things originally in there. My ProtoEd stopped working in 98 - the current protos.tab is just too big for it, it seems - and by 'stopped working' I mean 'corrupted the hell out of the damn thing'. So to keep it useable for KotB I deleted stuff like the characters and items from DH that would never make an appearance, shrank the protos.tab to a manageable size and kept hacking away. However, since I have been adding a lot of new, unique items, I went looking for more things to delete. I got rid of Wonnilon's backpack, but next time I ran the game, it CTDed while loading (in the sectoring bit, not the protos bit).

Although in KotB none of the maps etc from ToEE get used, they are still in there, in the .dat file, and they still get 'loaded' at the begining. The game hit the point where the .mob for Wonnilon's backpack is, found no corresponding proto and CTDed.

Toffee supports user-made .dat files and in the future this may not be an issue but for now, anyone making a new module has to modify or expand whats there, you can't just delete the existing stuff.
Shiningted is offline   Reply With Quote
Old January 6th, 2006   #16
darmagon
stumbler in the dark
 
darmagon's Avatar
 
Join Date: Mar 2005
Posts: 295
Re: Well whaddya know?

Okay, you might want to know this: column 4 (0 based) in the partsys.tab files affects the duration of the effect. Also, a spell with mutiple recipients will have the spell sound played once per recipient if the spell sound is specified in the "spell_effect" slot for the spell in snd_spell.mes. To avoid this, (for spells with mulitiple "effectees" , use the spell begin sound slot.

Darmagon
__________________
Go ahead. Contact Other Planes all you want. The proof is still in the Black Pudding.....
darmagon is offline   Reply With Quote
Old January 22nd, 2006   #17
Cujo
Mad Hatter
 
Cujo's Avatar
 
Join Date: Apr 2005
Location: Saurfang
Posts: 3,480
Re: Well whaddya know?

you can only make new clothes out of the ones that already exist in the game - creative thought onto how you can use the skm's is required

there are 4 different areas you can apply a skin to - HEAD, GLOVES, BOOTS, CHEST.

anything that goes {CHEST:art\meshes\ will replace the skin aplyed to the chest the same goes for the rest of the other areas.

addmesh can be applyed without a skin eg helms - so you'll get invisable if you apply to the clothing slot, have some addmesh disapear if equiped to the robes slot and are wearing armour that has addmesh - or if the item has more than one addmesh it'll loose one of the meshes when you equip a helm.

I havn't tested yet but I think that if you have the addmesh equip to the necklace slot that might do it (just a theory)

to make complex clothings - ones with new addmesh you will need a hex editor
__________________
“Scientists are saying the future is going to be far more futuristic than they originally predicted.”
I killed two dwarves in the morning. I killed two dwarves at night
I killed two dwarves in the afternoon, and then I feel alright
I killed two dwarves in times of peace and two in times of war
I killed two dwarves before I killed two dwarves
And then I killed two more

Super Moderator
011101110110100101101110001000000110000100100000
011000110110111101101111011010110110100101100101

Last edited by Cujo; February 27th, 2006 at 03:08 AM.
Cujo is offline   Reply With Quote
Old January 29th, 2006   #18
darmagon
stumbler in the dark
 
darmagon's Avatar
 
Join Date: Mar 2005
Posts: 295
Re: Well whaddya know?

You can change the scripts of an npc on the fly by accessing the scripts attribute. It is an array which contains, apparently in the same order as in the protos, the number of the file for each script. So say you want to create a Greater temple bugbear and you want to have a conversation with him as though he were Jaroo:
Code:
bb = game.obj_create(14174, game.party[0].location)
bb.scripts[9]=12# 9 is the number for san_dialog and 12 is jaroos script number
Now just initiate dialog with him and there is a bugbear in front of you with Jaroos dialog coming out of him. Yeah I know, you could have done it in the protos but this way you don't have to change the protos.

Not sure how useful this might be (except for such parlour tricks) but who knows....

Also you can get a list (actually it's a tuple) of the feat numbers (as defined in feats.mes) a critter has with:
Code:
cf = critter.feats
Again, probably not very useful (especially since you can't change the feats this way, and believe me I tried.)

Darmagon
__________________
Go ahead. Contact Other Planes all you want. The proof is still in the Black Pudding.....
darmagon is offline   Reply With Quote
Old February 3rd, 2006   #19
Shiningted
Lay off the junk son
 
Shiningted's Avatar
 
Join Date: Oct 2004
Location: Sydney
Posts: 9,149
Re: Well whaddya know?

Fact: Attachee.float_line() is the best command in the game.

However, it cannot properly be triggered from someone else's dialogue if they have vocals. For instance, if you did the following:
Code:
def	npc_float( attachee, triggerer ):
	npc = find_npc_near(attachee,14681)
	if (npc != OBJ_HANDLE_NULL):
		npc.float_line(610,triggerer)
The floatline WOULD appear but any vocals would be lost because the game turns down other sounds when a critter is talking.

This assumes the attachee critter has vocals of course (that is, an appropriately numbered folder in data/sound/speech). Otherwise it would probably work ok

Last edited by Shiningted; February 3rd, 2006 at 06:44 AM.
Shiningted is offline   Reply With Quote
Old February 25th, 2006   #20
Shiningted
Lay off the junk son
 
Shiningted's Avatar
 
Join Date: Oct 2004
Location: Sydney
Posts: 9,149
Re: Well whaddya know?

Fact: we have a new forum!

Just a reminder that the things that are found in utilities.py can be used individually. For instance, if we look at the familiar is_safe_to_talk()
Code:
def is_safe_to_talk(speaker,listener):
	if (speaker.can_see(listener)):
		if (speaker.distance_to(listener) <= 15):
			return 1
	return 0
we can still use if (attachee.can_see(triggerer)): as a seperate command in a script - damn good way of establishing line of sight

EDIT: There is also a has_los (has line-of-sight) command which works just fine.

Last edited by Shiningted; December 8th, 2006 at 10:09 PM.
Shiningted is offline   Reply With Quote
Old February 25th, 2006   #21
Allyx
Master Crafter
 
Allyx's Avatar
 
Join Date: Dec 2004
Location: U.K.
Posts: 3,301
Re: Well whaddya know?

I just realized I never actually posted the "disappearance/reappearance" trick in huge detail...

Firstly you make a new mobile object (the NPC you want to "move", and set the following object flags:
OF_SEE_THROUGH
OF_SHOOT_THROUGH
OF_PROVIDES_COVER
OF_SET HEIGHT
OF_RADIUS_SET

Make sure your NPC's San_heartbeat entry in protos.tab is set to look for your NPC's script file. The following is a portion from the Lord Viscount's (in Verbobonc) script file...

Code:
def san_heartbeat( attachee, triggerer ):
	if (is_daytime() == 0 and attachee.map == 5122 and game.global_flags[992] == 0):
		attachee.object_flag_set(OF_OFF)
	elif (attachee.map == 5122 and game.global_flags[992] == 1):
		attachee.object_flag_set(OF_OFF)
	elif (is_daytime() == 1 and attachee.map == 5132 and game.global_flags[992] == 0):
		attachee.object_flag_set(OF_OFF)
	elif (attachee.map == 5132 and game.global_flags[992] == 1):
		attachee.object_flag_set(OF_OFF)
	else:
		attachee.object_flag_unset(OF_OFF)
	return RUN_DEFAULT
Now map 5122 and map 5123 are his home and his office maps, global_flags [992] is set to 1 when he is dead (so he doesn't appear in location 2 after you killed him in location 1).

The Smigmal escape example is also quite useful, it's triggered by dialogue this time though...

Code:
def smigmal_escape( attachee, triggerer ):
	attachee.object_flag_set(OF_OFF)
	game.timevent_add( smigmal_return, ( attachee, ), 7200000 )
	return RUN_DEFAULT

def smigmal_return( attachee ):
	attachee.object_flag_unset(OF_OFF)
	game.global_flags[144] = 1
	return RUN_DEFAULT
When it works right it's ALL good!
__________________
"I don't want it back. You can never get rid of the smell, you know. Besides, that dagger was Flint's!" - Tasslehoff Burrfoot.

Allyx is offline   Reply With Quote
Old February 26th, 2006   #22
Cuchulainn
Windmill Tilter
 
Cuchulainn's Avatar
 
Join Date: Jan 2006
Location: McBride, B.C. Canada
Posts: 611
Re: Well whaddya know?

Inventory Icons.

Hey I finaly get to post something here. This won't be news to the longtimers, but it took me ages to figure it out and it doesn't seem to be posted anywhere.

Invetory icons are 64x64 tgas stored in data\art\interface\inventory. They are referenced in inventory.mes in the same folder. Column 53 (inventory icon) in the protos.tab contains a 3 digit # that matches an entry in inventory.mes The format for the file entry is
{00xxx}{myfile.tga)
So for new items just make your new 64x64 pic, save it in the right folder. Make the new entry in inventory.mes, and enter the 3 digit number in column 53 of you protos row.

Also if you define the item in your tga as 100% alpha(white), leaving everything else as 0% alpha(black), the background will be treated as transparent. This means you don't see a black square around it when moving/dropping the item.

Cuchulainn.
__________________
"We live as if the world were as it should be"

Last edited by Cuchulainn; June 15th, 2006 at 03:51 PM. Reason: typo/clarification
Cuchulainn is offline   Reply With Quote
Old February 27th, 2006   #23
darmagon
stumbler in the dark
 
darmagon's Avatar
 
Join Date: Mar 2005
Posts: 295
Re: Well whaddya know?

Okay, this is going to be a 3 part post (at least)

First: game.sound() is a function you can use to play sounds in the game (using a script or from the console.) Duh! pretty obvious. What has not been so obvious thus far (AFAIK) is how to use the function and this is my discovery. ToEE2.dat has a folder 'sound'. In that folder there is a file called 'SND_00INDEX.MES' which provides some index numbers for various other files to be found in the same folder. These other files have numbers assigned to certain sounds by path/file name relative to the sound directory. These 2 numbers are the arguments to use when calling 'game.sound'. First comes the number of the sound in the indexed file and then comes the number of the indexed file from 'SND_00INDEX.MES'. So, if you check it out , try this in the console (or script):
Code:
game.sound(690,1)
This should give you the ice lizard attack sound......(Warning, not sure why but some sounds repeat a few times when invoked with this function. My first cursory check indicates that it is only brief sounds but that may be incorrect, More tests should be made.....)

Second: I know I posted the method for finding out about the functions available upon a certain game object a long time ago but some recent posts have made it obvious that:either no one saw it or no one bothered to carry through with the steps . In any case please find the .txt files attached below. They don't tell you how to use the functions but at leat they list what is there so you can try to figure them out (as I did with game.sound())

Third: included in the attached files below is a list of (possible) parameters for 'obj_set_int' and 'obj_get_int' (from char_attribs.txt) Be warned, it is certain that trying to use some of these with the aforementioned functions will cause a CTD. Others will give you what you want and still others have an arcane way of doing things which I haven't been able to fully crack yet (pm me for details if you are interested).

Finally,also included with what I have attached below is a list of many of the unique identifiiers used in the game code 'toee_list.txt'. It is redundant in some instances but contains other information which might be useful.

In case anyone happens to be wondering why I never shared these things before: First I did share the method for finding out much of this info somewhere else; Second I did repost toee_list.txt somewhere else and third I just discovered the sound stuff yesterday......

EDIT:
The one thing I forgot is :this: http://www.radgametools.com/bnkmain.htm
with this we should be able to make our own bink video files and add them to the game.... Haven't tested it yet but the label says....

Darmagon

EDIT BY SHININGTED: I hope Darmagon doesn't mind me saying this, but I believe he is in error on the use of the game.sound command.

Its actually much simpler than it seems: you play the game sound, and the number of times you want to hear it. This explains the 'repeat sounds' Darmagon was experiencing. Thus the command

game.sound(xxxx, y)

will play sound xxxx on y number of occasions. Examples of this in action can be found in Spell785 - Use Vial.py.
Attached Files
File Type: txt gameattribs.txt (963 Bytes, 19 views)
File Type: txt Char_attribs.txt (2.7 KB, 25 views)
File Type: txt gametimeattribs.txt (316 Bytes, 19 views)
File Type: txt objf.txt (11.0 KB, 23 views)
File Type: txt toee_list.txt (52.9 KB, 31 views)
__________________
Go ahead. Contact Other Planes all you want. The proof is still in the Black Pudding.....

Last edited by Shiningted; April 28th, 2007 at 12:14 AM.
darmagon is offline   Reply With Quote
Old March 10th, 2006   #24
Cuchulainn
Windmill Tilter
 
Cuchulainn's Avatar
 
Join Date: Jan 2006
Location: McBride, B.C. Canada
Posts: 611
Re: Well whaddya know?

Transparency in model tgas.

When editing a tga that get's wrapped around a model in game (either base or addmesh) you can define a part of the tga as 100% in the alpha channel, everything you've left as 0% alpha becomes transparent in game. This gives us a lot of flexability when making new items.

Think the shoulder pads are to big on the studded leather and the collar looks stupid. Set only the portions of the addmesh you want keep as vissible.

Desperatly want to make that diamond shaped shield you saw in a Heavy Metal comic. Open up the tower shield tga define a diamond shape inside the original shield as 100% alpha, and voila diamond shaped shield.

When you remove portions of an addmesh the armor underneath shows through. Of course if you remove portions of the base armor you just get a hole. So it's not much use on base armor or clothing, unless of course you want a peg leg, a one armed man, or as Cujo said the headless horseman.

Cuchulainn.
__________________
"We live as if the world were as it should be"

Last edited by Cuchulainn; June 15th, 2006 at 03:59 PM. Reason: typos/clarification
Cuchulainn is offline   Reply With Quote
Old April 21st, 2006   #25
Shiningted
Lay off the junk son
 
Shiningted's Avatar
 
Join Date: Oct 2004
Location: Sydney
Posts: 9,149
Re: Well whaddya know?

Fact: Keeping track of things that are switched off can be a pain: even basic console commands like game.obj_list_vicinity() won't find things flagged OF_OFF.

To at least check if they are there, easier than setting/unsetting flags with ToEEWB (or scripts), just stick some game.particles in the heartbeat as you would with any other script you are testing. Mage armor works great for this:
Code:
def san_first_heartbeat( attachee, triggerer ):
	game.particles( "sp-mage armor", attachee )
Shiningted is offline   Reply With Quote
Old April 21st, 2006   #26
Cerulean the Blue
Blue Meanie
 
Cerulean the Blue's Avatar
 
Join Date: Apr 2005
Location: Portland, Oregon
Posts: 1,960
Re: Well whaddya know?

If you flag something as OF_OFF in the MOB, you won't be able to unset that flag from a script.

EDIT BY SHININGTED: Actually you can: I think Blue has noticed that too
__________________
"No. The only thing that lasts forever is apathy. But who cares."

Last edited by Shiningted; April 28th, 2007 at 12:16 AM.
Cerulean the Blue is offline   Reply With Quote
Old April 23rd, 2006   #27
Shiningted
Lay off the junk son
 
Shiningted's Avatar
 
Join Date: Oct 2004
Location: Sydney
Posts: 9,149
Re: Well whaddya know?

Apparent fact (painfully tested): The first time you enter a map, all the first_heartbeat files will fire everywhere. However, if you have been there before, they only fire as you enter their sector.

Theory: Clearing the map_cache may change this.

Edit: Deleting the .pyc might change this too, but you rarely do it as part of playing a normal game

2nd Edit: This has NOT happened consistently for me (or it has consistently happened on some large maps and consistently not happened on other large maps).

Just be aware that on any subsequent visit, you may have to come within 'range' to activate a first heartbeat file on a mob that is a fair distance from the landing spot.

Last edited by Shiningted; April 28th, 2007 at 12:19 AM.
Shiningted is offline   Reply With Quote
Old April 26th, 2006   #28
Allyx
Master Crafter
 
Allyx's Avatar
 
Join Date: Dec 2004
Location: U.K.
Posts: 3,301
NPC Generators.

Question: How do those rats in the Moathouse keep coming back?

Answer: There is one rat that is set as an NPC generator, it repeatedly spawns rats until the maximum number of rats (127) have been spawned.

Question: How do I make an NPC generator?

Answer: Open ToEEWB, on the "Objects" tab click "New" to make a new mobile, select the monster type you want to generate (only one type per generator) in the "prototype:" field check the dispatcher check box, and set the X-Y co-ordinates and rotation you want the creatures to originate from.

Next, set the flags...

OBJECT FLAGS (set the following)
OF_OFF
OF_SEE_THROUGH
OF_PROVIDES_COVER
OF_INVULNERABLE
OF_HEIGHT_SET
OF_RADIUS_SET

NPC FLAGS
ONF_WAYPOINTS_DAY
ONF_WAYPOINTS_NIGHT
ONF_KOS (not needed, but can be set if you want the critters to attack on sight)
ONF_GENERATOR

Next, on the "NPC/Critters" tab check the Waypoints check box and set some waypoints (area's you want your generated critters to wander to, in sequence).

Now go to the NPC Generator tab, check the "NPC is a Generator" check box, set the Generator ID number (the rat's in the moathouse are number 1, i'm using 2-7) I think the numbers must all be different from eachother.

Check the boxes to activate the generator at day and or night, (not sure what active on screen is yet) Check "spawn all to get the selected number of critters to spawn simultaneously, or leave blank to spawn one at a time, put the number of critters you'd like active at anyone time from this spawner in the "Concurrent Spawn Maximum" box (Max number is 31).

Set the "Total Spawn Number" (Max 127) check the box to ignore this number. and set the "Spawn Beat Rate" (the moathouse rats respawn every second). Now save your mobile and put in in the map folder you want it to be in.
__________________
"I don't want it back. You can never get rid of the smell, you know. Besides, that dagger was Flint's!" - Tasslehoff Burrfoot.


Last edited by Allyx; April 26th, 2006 at 05:19 PM.
Allyx is offline   Reply With Quote
Old April 26th, 2006   #29
Allyx
Master Crafter
 
Allyx's Avatar
 
Join Date: Dec 2004
Location: U.K.
Posts: 3,301
Scout points

Question: How do I get a monster to run off and warn his buddy's that i'm in the area, like that bugear in the Moathouse does?

Answer: Give it a scout point, here's how...

Make your new mobile set the prototype, location and rotation (as I detailed above for the generator) and set these flags...

NPC flags
ONF_WAYPOINTS_DAY
ONF_KOS

NPC/Critters 2
Check the "Standpoints" checkbox and put the same co-ordinates you selected for the critter before for both day and night standpoints. The X Y offsets can be adjusted to shift the critter around the selected tile if it looks a little odd, and don't forget the map number.

Check the "Scout X" check box, and enter the co-ordinates you want the critter to run to, if there are critters around that location, they too will become active and added to the combat initiative order.
__________________
"I don't want it back. You can never get rid of the smell, you know. Besides, that dagger was Flint's!" - Tasslehoff Burrfoot.


Last edited by Allyx; April 26th, 2006 at 05:22 PM.
Allyx is offline   Reply With Quote
Old May 28th, 2006   #30
darmagon
stumbler in the dark
 
darmagon's Avatar
 
Join Date: Mar 2005
Posts: 295
Re: Well whaddya know?

Item slot as per item_worn_at
  • 0-hat/eyeglasses
  • 1 necklace
  • 2 gloves
  • 3 primary weapon
  • 4 secondary weapon / big shield
  • 5 armor
  • 6 primary ring
  • 7 secondary ring
  • 8 boots
  • 9 ammo
  • 10 cloak
  • 11 2nd shield spot/ buckler spot
  • 12 robe
  • 13 bracers
  • 14 bard's instrument
  • 15 thieves tools
__________________
Go ahead. Contact Other Planes all you want. The proof is still in the Black Pudding.....

Last edited by darmagon; June 2nd, 2006 at 05:10 AM. Reason: remove list numbers
darmagon is offline   Reply With Quote
Reply



Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 07:34 AM.
Our Host!


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Circle of Eight Design by Ian Miles "Sol Invictus" Cheong