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:29 am]
DarkenedFantasies -- Probably just didn't care. For example, at some point before release, they've updated the graphics of some of the Protoss buildings (Forge, CyberCore, Citadel, Observatory, Arbiter Tribunal), but instead of properly re-rendering them with edited 3D models, they did crappy copy-paste jobs on the rendered graphics.
[08:35 pm]
Ultraviolet -- :wob:
[2026-6-21. : 11:38 pm]
Symmetry -- :wob:
[2026-6-21. : 4:56 am]
Ultraviolet -- I suppose we'll likely never know, but my guess would be that they already saw it operating successfully and there was no monetary incentive to finish the original work. And the dev cycle in old school Blizzard was so hectic, it's possible it just got forgotten about after the original game got released. Plus there's an element of existing MPQ files that were packaged with the original discs becoming outdated if they updated it. And it's not like they remade the original MPQs, they just made new ones for BW specifically
[2026-6-21. : 4:26 am]
Oh_Man -- so that makes me think maybe the theory they are unfinished is not true and its a deliberate design decision, coz why not finish them wen ur making brood war?
[2026-6-21. : 4:25 am]
Oh_Man -- the thing is thos buildings are from classic. that means they went ahead and made brood war without ever finishing the 'unfinished' buildings
[2026-6-20. : 6:15 pm]
Ultraviolet -- Yeah he's talked about a lot of that stuff in his casts before. It seems plausible. Especially knowing how Blizzard of yesteryear operated.
[2026-6-20. : 3:47 pm]
NudeRaider -- to clarify: couldn't recall the behavior for every single Protoss building but I was aware the disparity exists.
[2026-6-20. : 3:43 pm]
NudeRaider -- Contained nothing new for me. Didn't know all building's behavior, but very much all unit's. Also Terran balance whine - also nothing new :lol:
[2026-6-19. : 9:57 am]
Oh_Man -- makes me wonder if SEN knows anything about the topic
Please log in to shout.


Members Online: Excalibur