CSBEdit & Monster Attacks

Use this forum to discuss dungeon editors and other tools, like DMute (by George Gilbert, also working for RTC dungeons), DM Builder (by Sphenx), and ADGE by `rain. Includes DM editing tips and tricks.
Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

CSBEdit & Monster Attacks

Post 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.
User avatar
PaulH
Ghastly gastropod
Posts: 3763
Joined: Wed Aug 07, 2002 10:27 pm
Location: Level 6

Post 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.
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post 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!
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

I don't recall any 'hard-coding' for monster attacks.
The information is in the graphics.dat, I believe.
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post 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.
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post 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'.
User avatar
rain`
Artisan
Posts: 164
Joined: Sat Feb 19, 2005 11:44 pm

Post 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.
User avatar
rain`
Artisan
Posts: 164
Joined: Sat Feb 19, 2005 11:44 pm

Post 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 =]
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post 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.
User avatar
rain`
Artisan
Posts: 164
Joined: Sat Feb 19, 2005 11:44 pm

Post by rain` »

that i did. they all look the same i swear!
User avatar
rain`
Artisan
Posts: 164
Joined: Sat Feb 19, 2005 11:44 pm

Post 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
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post 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?
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post 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...
User avatar
rain`
Artisan
Posts: 164
Joined: Sat Feb 19, 2005 11:44 pm

Post 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.
User avatar
rain`
Artisan
Posts: 164
Joined: Sat Feb 19, 2005 11:44 pm

Post 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.
User avatar
purple1
Adept
Posts: 237
Joined: Wed Jul 14, 2004 5:04 pm
Location: California, USA

Post 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.
Post Reply

Return to “Editors and Tools (DMute, DM Builder, ADGE, etc.)”