Staredit Network > Forums > Modding Assistance > Topic: Modding Queen Help
Modding Queen Help
Jul 5 2012, 3:07 am
By: NickClegg  

Jul 5 2012, 3:07 am NickClegg Post #1



Quote
----------------------------------------------------------------------------- #
# This is a decompile of the iscript.bin file 'data\scripts\iscript.bin'
# created on: Wed Jul 04 21:46:16 2012
# ----------------------------------------------------------------------------- #

# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 046 Queen (zerg\queen.grp)
.headerstart
IsId 27
Type 12
Init QueenInit
Death QueenDeath
GndAttkInit QueenGndAttkInit
AirAttkInit QueenGndAttkInit
Unused1 [NONE]
GndAttkRpt QueenGndAttkInit
AirAttkRpt QueenGndAttkInit
CastSpell QueenCastSpell
GndAttkToIdle QueenGndAttkToIdle
AirAttkToIdle QueenGndAttkToIdle
Unused2 [NONE]
Walking QueenWalking
WalkingToIdle QueenGndAttkToIdle
SpecialState1 [NONE]
.headerend
# ----------------------------------------------------------------------------- #

QueenInit:
imgul 47 0 42 # QueenShad (zerg\queen.grp)
playfram 0x00 # frame set 0
waitrand 1 4
QueenGndAttkToIdle:
playfram 0x00 # frame set 0
wait 2
playfram 0x11 # frame set 1
wait 2
playfram 0x22 # frame set 2
wait 2
playfram 0x33 # frame set 3
wait 2
playfram 0x44 # frame set 4
wait 2
goto QueenGndAttkToIdle

QueenDeath:
playsndbtwn 925 927 # Zerg\Queen\ZQuDth00.WAV, Zerg\Queen\ZQuDth02.WAV
sprol 156 0 0 # QueenBirth (zerg\zquDeath.grp)
wait 1
end

QueenGndAttkInit:
setvertpos 0
playfram 0x55 # frame set 5
wait 1
playfram 0x66 # frame set 6
wait 1
playfram 0x77 # frame set 7
wait 1
playfram 0x88 # frame set 8
playsnd 90 # Bullet\ZQuFir00.wav
attackwith 1
wait 1
playfram 0x99 # frame set 9
wait 1
playfram 0xaa # frame set 10
gotorepeatattk
goto QueenGndAttkToIdle

QueenCastSpell:
setvertpos 0
playfram 0x55 # frame set 5
nobrkcodestart
wait 1
playfram 0x66 # frame set 6
wait 1
playfram 0x77 # frame set 7
wait 1
playfram 0x88 # frame set 8
castspell
sigorder 2
wait 1
playfram 0x99 # frame set 9
wait 1
playfram 0xaa # frame set 10
nobrkcodeend
gotorepeatattk
goto QueenGndAttkToIdle

QueenWalking:
playfram 0x00 # frame set 0
wait 1
playfram 0x11 # frame set 1
wait 1
playfram 0x22 # frame set 2
wait 1
playfram 0x33 # frame set 3
wait 1
playfram 0x44 # frame set 4
wait 1
goto QueenWalking
Okay so, this is this unmodified but it works (sorta) script, and I don't think it's wrong or anything, but for some odd reason, I can't get my queen to attack. Everytime I right click an enemy unit that isnt a burning command center, it says "can't attack" and that's it. Anyone have any ideas? I surely dont :/

I also made the changes with DatEdit when it comes to AI Action. Is this a hard coded problem that I can't do anything about?



None.

Jul 5 2012, 4:22 am Pr0nogo Post #2



Make sure your Queen's attack in weapons.dat has the target flags for the type of unit you're trying to attack (e.g. if you want it to attack ground units, make sure its weapon has the ground flag checked).

As for your iscript, I don't see a QueenGndAttkToIdle header. Is this the complete script or did you just copy a portion of it? If this is the complete script, add in an iscript header for QueenGndAttkToIdle, else when the Queen actually attacks it will crash the game because there's no coding for the referenced header.

/e I can't read, ignore the second line.

/e2 Go into DatEdit, edit the unit's AI Actions tab. Where it says 'Attack Unit,' replace that field with 'Attack Unit (Normal)' and replace Right-click Action with 'Normal Movement/Normal Attack.'

Post has been edited 1 time(s), last time on Jul 5 2012, 4:28 am by Pr0nogo.




Jul 5 2012, 5:54 am NickClegg Post #3



Quote from Pr0nogo
Make sure your Queen's attack in weapons.dat has the target flags for the type of unit you're trying to attack (e.g. if you want it to attack ground units, make sure its weapon has the ground flag checked).

As for your iscript, I don't see a QueenGndAttkToIdle header. Is this the complete script or did you just copy a portion of it? If this is the complete script, add in an iscript header for QueenGndAttkToIdle, else when the Queen actually attacks it will crash the game because there's no coding for the referenced header.

/e I can't read, ignore the second line.

/e2 Go into DatEdit, edit the unit's AI Actions tab. Where it says 'Attack Unit,' replace that field with 'Attack Unit (Normal)' and replace Right-click Action with 'Normal Movement/Normal Attack.'
I did all that, AI Action and flags and everything. It's still not letting me attack units normally



None.

Jul 5 2012, 8:18 pm Pr0nogo Post #4



Ah, did some quick digging around and found that you'll have to use a different unit - but have no fear! See the attached mod and the files within. I've done the work for you.


Voila!

CAVEAT: The wireframe is incorrect, because I replaced the 'Cave' unit. Extract the wireframe grps from regular StarDat/BrooDat and replace the Cave frame with the Queen frame.

This IS trainable from the Larvae. All spells appear to work correctly.




Jul 5 2012, 10:51 pm NickClegg Post #5



GG NO RE

You did it, and dang, I never had luck modding those unused units. Looks like I have the stuff to get it right then.

Thanks though. I'd really appreciate the help. I'm gonna go work on this.



None.

Jul 6 2012, 12:08 am IskatuMesk Post #6

Lord of the Locker Room

Several units in sc have hardcoded garbage associated with them. The queen is one for exactly the problem you were having. The medic is another that is like that. The Lurker has some AI-related problems. So on so forth.



Show them your butt, and when you do, slap it so it creates a sound akin to a chorus of screaming spider monkeys flogging a chime with cacti. Only then can you find your destiny at the tip of the shaft.

Jul 6 2012, 1:26 pm Pr0nogo Post #7



If you want more dynamic units based on hardcoded ones, then you need to replace unused ones in DatEdit and change the buttons in Firegraft to point to these new units. Along with DAT Requirements and switching what uses the button sets (and probably some TBLPad editing), that's your method.




Jul 6 2012, 2:33 pm IskatuMesk Post #8

Lord of the Locker Room

Be sure to update the AI ids as well when you move stuff around.



Show them your butt, and when you do, slap it so it creates a sound akin to a chorus of screaming spider monkeys flogging a chime with cacti. Only then can you find your destiny at the tip of the shaft.

Jul 6 2012, 2:52 pm Pr0nogo Post #9



Oh, that's right. The Zerg AI won't make Queens by default now, since the Queen is actually the Cave and the former Queen is unused.




Jul 6 2012, 2:55 pm IskatuMesk Post #10

Lord of the Locker Room

AI reads requirements (not buttons), so it's possible to give the AI the original queen (and the attack may work for the AI as well), but if you replace the id with the new one it won't use the spells since those are hardcoded for the AI.



Show them your butt, and when you do, slap it so it creates a sound akin to a chorus of screaming spider monkeys flogging a chime with cacti. Only then can you find your destiny at the tip of the shaft.

Jul 6 2012, 11:29 pm Pr0nogo Post #11



Ah, okay. In my attachment, I edited the DAT Requirements and made the Queen not use a button set (also renamed it to 'Unused').




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[03:45 am]
Sylph-Of-Space -- Does the shoutbox get disabled when there's spammers?
[2024-5-17. : 6:47 am]
NudeRaider -- lil-Inferno
lil-Inferno shouted: nah
strong
[2024-5-17. : 5:41 am]
Ultraviolet -- 🤔 so inf is in you?
[2024-5-17. : 4:57 am]
O)FaRTy1billion[MM] -- my name is mud
[2024-5-17. : 4:35 am]
Ultraviolet -- mud, meet my friend, the stick
[2024-5-16. : 10:07 pm]
lil-Inferno -- nah
[2024-5-16. : 8:36 pm]
Ultraviolet -- Inf, we've got a job for you. ASUS has been very naughty and we need our lil guy to go do their mom's to teach them if they fuck around, they gon' find out
[2024-5-16. : 5:25 pm]
NudeRaider -- there he is, right on time! Go UV! :D
[2024-5-16. : 5:24 pm]
lil-Inferno -- poopoo
[2024-5-16. : 5:14 pm]
UndeadStar -- I wonder if that's what happened to me. A returned product (screen) was "officially lost" for a while before being found and refunded. Maybe it would have remained "lost" if I didn't communicate?
Please log in to shout.


Members Online: RIVE, Wing Zero, 1carolinee471rM1