Page 1 of 1
CSBEdit & Monster Attacks
Posted: Wed Apr 28, 2004 7:42 pm
by Gambit37
I'm using CSBedit (Rain's fab tool) to modify my monsters for a new custom adventure I'm making.
Does anyone know how to change the attacks a monster makes? For example, I want to make the Muncher fire a spell -- is this possible? There are lots of 'unused' or 'unknown' bytes in rain's documentation, and I've tried modifying a few of these, but nothing seems to change each monster's specific attacks.
Posted: Wed Apr 28, 2004 10:16 pm
by PaulH
It is a great tool, and I was quite amused when I made fire pits start to wonder round a level. I do not know how to change monster attacks directly, but you could, for instance, change a graphic of a monster with similar characteristics to that which you require to graphics of the muncher and edit from there.
Posted: Wed Apr 28, 2004 10:56 pm
by Gambit37
Thanks for the suggestion, but I'm trying to do far more than that.... probably the attacks are hard coded for each monster so I doubt I can change them. Oh well!
Posted: Thu Apr 29, 2004 1:36 am
by Paul Stevens
I don't recall any 'hard-coding' for monster attacks.
The information is in the graphics.dat, I believe.
Posted: Thu Apr 29, 2004 3:38 am
by Zyx
I don't know which bits are coding the attack but I know it is coded in the graphics.dat.
Rain's tool show a value for the attacktype from 0 to 7 which has an influencee about the chractaeritic used involved in defense (dexterity, wisdom, etc).
Remember you are not necessarily allowed to edit all the values of a word separately, sometimes you can only edit the complete word.
The easiest way to find where are these attack bits is to copy half the words of a monster to another and check if they attack has been transmited. Then repeat the process a quarter, etc.
Posted: Thu Apr 29, 2004 7:39 pm
by Gambit37
Not sure what you mean by that -- do you mean use CSBedit to copy the value of word 5 between monsters -- or actually hex edit the raw data files?
I managed to get the muncher to throw zo spells, but not quite sure how! It also seems to be something to do with 'spellrange'.
Posted: Thu Jul 15, 2004 8:54 pm
by rain`
I dunno man, i think they might be hard coded, your best bet would be to just readjusting values in the monsters variables (everything monster related is editable, but its just that alot of the data has unknown values. I went through the CSB4win source code to find most of what in there means, the other things were too difficult to decypher so i left it alone. spell range could actually be spell type, and attacktype could be something else. I never tested any of the meanings of each one by changing its values but i assume that if its not hard coded (i'm not about to hunt through CSB4win source again to find it for sure because theres still alot of decompiled code in there), it must be editable.
Only thing you can do really is edit a monster in CSBEdit, recompile graphics.dat file, try a dungeon (you can make a dungeon where all you do is pick a hero and look at your monster your editing) and see if he starts shooting. If not, change the value back, and edit a different value. its tedious but the only other solution is going through the csb4win source and that is a feat in itself somtimes.
Posted: Fri Jul 16, 2004 3:30 am
by rain`
quick note: when editing DSA's, if you use absolute locations via hand it causes some errors that arent errors. Hard to explain so example:
in CSBuild v1.3 (latest), edit DSA and put L0(0,0)S in and close, when you reopen the DSA it becomes L0(0,0)2 which is essentially the same thing, but if you click on that line and try to close it or tab out or edit another line it tells you it is invalid until you change the 2 back to an S.
Very annoying =]
Posted: Fri Jul 16, 2004 3:44 am
by Paul Stevens
Extremely annoying! I'll get right on it. An asymetry in the encode/decode.
By the way, I think you missed the CSBuild forum and wound up in
the CSBEdit forum.
Posted: Fri Jul 16, 2004 3:55 am
by rain`
that i did. they all look the same i swear!
Posted: Thu Jul 22, 2004 8:24 pm
by rain`
stumbling into it today when mining for information from CSB4win source i found out that if you modify the spell range of a monster to anything > 1, it will attempt to cast a spell at you. The spell it casts is hard coded depending on the monster (dragons shoot fireballs, zytaz shoot poison clouds, fireballs, or zo spells, etc).
There is no way to make mummies shoot fireballs.
Hope this helps
Posted: Thu Jul 22, 2004 8:31 pm
by beowuuf
So attacks and their assignment are in the engine, the graphics.dat just says whether these abilities are on, and at what strength?
Posted: Thu Jul 22, 2004 8:53 pm
by Gambit37
Hmm... so some monsters must have spells assigned, even though they don't normally use them, as I have definitely got the mucher lobbing ZO spells at me...
Posted: Fri Jul 23, 2004 1:44 am
by rain`
I'm suprised you got zo spells out of munchers, i would have expected nothing more then a crash =]
heres a little snippit of the code in lamens terms:
if ( monsters spell range is > 1 and either the distance from monster to party is > 1 or random number between 0 and 1 is 1 then do the following:
if monster is vexirk or lordchaos then (pick spell = a random between fireball, dispel, lightning, poison cloud, or zo spell)
else if monster is slime devil, spell = poison
else if monster = flying eye spell = random (7/8ths chance) lightning (1/8ths chance) zo
else if monster = zytaz spell = (random poisoncloud or fireball)
else if monster = demon or dragon: spell = fireball.
cast spell.
Obviously there is no 'muncher' listed here, so the spell would theoretically be either 0, a random number (causing strange results/crash) or maybe it would cast whatever spell was last casted by any monster.
unless you modify the source, you can't really make a monster cast a spell you desire 100% of the time.
Posted: Fri Jul 23, 2004 1:48 am
by rain`
also: the power of the spell is hard to know exactly but I'm sure it has everything to do with the monster's "power" stat and a tad bit of randomness.
Posted: Fri Jul 23, 2004 4:54 am
by purple1
Well, In DM2, Attack Minions are smart enough to open doors using Zo, but they only use Oh Kath Ra (lightning) as an attack. Of course, then we would need some AI, or some cause-and-effect programming so monsters don't randomly shoot out meaningless Zo spells.