[skip all navigation]

Modding Queen Help, iscript and everything.

Creator: NickClegg
Time: Jul 5 2012, 3:07 am

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

[Avatar]
offlinecontact
Rank: Member
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?

Top

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

[Avatar]
Rank: Goff
offlinecontact
Rank: Member
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.'
This post was edited 1 time, last edit by Pr0nogo: Jul 5 2012, 4:28 am.

(user posted image)
Top

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

[Avatar]
offlinecontact
Rank: Member
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

Top

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

[Avatar]
Rank: Goff
offlinecontact
Rank: Member
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.

(user posted image)
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.
Attachments:
exe file
Queen.exe (219.78 kb)
2 hits.

(user posted image)
Top

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

[Avatar]
offlinecontact
Rank: Member
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.

Top

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

[Avatar]
bannedcontact
Rank: Veteran
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.

Top

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

[Avatar]
Rank: Goff
offlinecontact
Rank: Member
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.

(user posted image)
Top

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

[Avatar]
bannedcontact
Rank: Veteran
Be sure to update the AI ids as well when you move stuff around.

Top

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

[Avatar]
Rank: Goff
offlinecontact
Rank: Member
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.

(user posted image)
Top

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

[Avatar]
bannedcontact
Rank: Veteran
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.

Top

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

[Avatar]
Rank: Goff
offlinecontact
Rank: Member
Ah, okay. In my attachment, I edited the DAT Requirements and made the Queen not use a button set (also renamed it to 'Unused').

(user posted image)
Top
0 members in this topic (italic members are currently writing a reply): None
+ guest(s)


[11:44 pm]
SFSKabam -- farty still hangs out at SEN? lul
[11:03 pm]
Fire_Kame -- Soccer sounds lame
[10:38 pm]
Dem0n -- :wob:
[10:31 pm]
O)FaRTy1billion -- no, clicky is fine
[10:14 pm]
NudeRaider -- nice, you even got that sz = ß right ;)
Please log in to shout.