Staredit Network > Forums > Modding Assistance > Topic: [SOLVED]Subunit Difficulties
[SOLVED]Subunit Difficulties
May 20 2011, 7:03 pm
By: Drakiazuu  

May 20 2011, 7:03 pm Drakiazuu Post #1



So I made a subunit for the vulture, a turret on the back. I used the zergling, simply because it was the first thing in the list that wasn't terran. I changed its graphics to the Science Vessel Turret. Made the .LO* File for it. Switched the zerglings weapon from claws to gauss rifle. Also tried ATS laser. Changed the iscript for the zergling. However, ingame the turret still does not fire. I've attached a compressed folder of the project isolated from my mod.
Assistance would be much appreciated - Please n thanks :)

Post has been edited 2 time(s), last time on May 27 2011, 2:42 am by Drakiazuu.



None.

May 21 2011, 2:27 am pastelmind Post #2



You need to give the base unit (the Vulture) animation sequences for GndAttkInit and GndAttkRpt. When a base-subunit combination is ordered to move, attack or do something, both the base unit and the subunit calls the corresponding iscript labels. Here, the base unit (Vulture) does not have GndAttkInit and GndAttkRpt animations to play while the subunit (turret) does the actual attacking. Give it some stand-still "animation", such as VultureGndAttkToIdle, and it should work.

Code
# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 256 Vulture (terran\Vulture.grp)
.headerstart
IsId               86
Type               13
Init               VultureInit
Death               VultureDeath
GndAttkInit         VultureGndAttkToIdle     # Changed from [NONE]
AirAttkInit         [NONE]
Unused1             [NONE]
GndAttkRpt         VultureGndAttkToIdle     # Changed from [NONE]
AirAttkRpt         [NONE]
CastSpell           [NONE]
GndAttkToIdle       VultureGndAttkToIdle
AirAttkToIdle       [NONE]
Unused2             [NONE]
Walking             VultureGndAttkToIdle
WalkingToIdle       VultureGndAttkToIdle
SpecialState1       VultureSpecialState1
.headerend
# ----------------------------------------------------------------------------- #

VultureInit:
    imgul               257 0 7     # VultureShad (terran\Vulture.grp)
    playfram           0x00     # frame set 0
    goto               VultureGndAttkToIdle

VultureGndAttkToIdle:
    wait               125
    goto               VultureGndAttkToIdle

VultureDeath:
    playsnd             353     # Terran\VULTURE\TVuDth00.WAV
    imgol               332 0 0     # TerranBuildingExplosionsmall (thingy\tBangS.grp)
    wait               3
    end                

VultureSpecialState1:
    attackwith         1
    sigorder           1
    wait               1
    end                




None.

May 21 2011, 2:38 am NicholasBeige Post #3



And people say Starcraft 2 map editing is hard :P



None.

May 21 2011, 4:27 am Drakiazuu Post #4



Okay, I tried that, but it still doesn't work. I referenced the Goliath code and it doesn't have what you suggested.
And on another note, I created attack animations for the turret, just added a muzzle flash for each of the directions, but it never looks right when I compile it to a GRP. I know about the palette stuff, so I only used stuff I found from decompiled starcraft grps, yet it still doesn't compile right.

Post has been edited 1 time(s), last time on May 21 2011, 4:33 am by Drakiazuu.



None.

May 21 2011, 5:32 am IskatuMesk Post #5

Lord of the Locker Room

I already explained how to handle the palettes over AIM, so you should have that covered.

There used to be a palette pack somewhere... hmmm

http://www.gameproc.com/meskstuff/PalPack.rar



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.

May 21 2011, 2:53 pm Drakiazuu Post #6



Uhm I still have absolutely no idea how it works. I applied the gamebasics palette to the images in Gimp and it just wacked out colors in gimp too =/ I don't understand the point of the palette, how to use it, or why the PyGRP can't compile the image properly... I used already existing starcraft GRPs, so why would I have to do anything with a color palette?



None.

May 22 2011, 12:19 am IskatuMesk Post #7

Lord of the Locker Room

I don't know how to use GIMP, as I always use PSP. If GIMP is anything like photoshop, it will handle palettes in an exceptionally irritating and difficult to use manner when concering sc sprites. Most programs will switch the images to another palette or raise the color depth when you edit them (photoshop requires you to do this for almost every function of the program, and unless you didn't suppress the warning you won't know unless you look at the image depth settings). This is probably what happened in GIMP as well, thus you must re-apply the palette.

You must apply the palette to the image and then save it as OS/2 RGB in the options (that's how PSP shows them, anyway)... I think. You can try RLE if that doesn't work.

Also, if the options allow you to, use "match by closest color" when you add the sc palette.

Post has been edited 1 time(s), last time on May 22 2011, 12:29 am by IskatuMesk.



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.

May 23 2011, 3:10 am Drakiazuu Post #8



Oh, see when I apply the color palette it doesn't have any sort of match by closest color, it goes by color index number... so I get the freaky colors =/ However I do understand the color depth stuff. I'll do some research into GIMP and see if I can figure it out. Thanks :)

Edit: And something else I'd like to add, my PyGRP Cannot decompile or compile any GRPs... It can only open them. I've tried running it in compatibility mode, and as admin, neither of which worked. I was told GRPEdit doesn't work properly. So should I be using something else?
I'll load up all my modding tools on a few of my other computers and give it a try and see if its just win7 x64. Cause win7 x64 has caused LOADS of problems for me with just about everything I try to do.

Post has been edited 1 time(s), last time on May 23 2011, 3:48 am by Drakiazuu.



None.

May 23 2011, 8:46 am IskatuMesk Post #9

Lord of the Locker Room

I only used GRPedit for previewing. I talked to BK when he was making it about compiling issues and such and he came to the same conclusion that I did - in some instances there can be problems.

I don't have experience in any of the Pytools besides, to a degree, PyAI (I used it for ZAPOC -> BWAI converting). Try using Shadowflare's converter - that's what I used and I never had any issues with it. You may want to ask poiuy_qwert himself.



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.

May 23 2011, 10:52 pm Drakiazuu Post #10



Alright, thanks for all the help IskatuMesk :D



None.

May 24 2011, 2:41 am pastelmind Post #11



About using PyGRP...I'm using Windows 7 and had some weird trouble too. With compatibility settings set to WinXP SP3 for both PyAI.exe and pythonw.exe, the EXE version of PyGRP cannot export frames to bitmaps, while the script version (PyGRP.pyw) cannot import bitmaps to frames. So I'm using both versions right now, it sucks but it works.



None.

May 24 2011, 5:18 am Drakiazuu Post #12



Alright I'm using ShadowFlare's GRP compiler/decompiler and doing fine now with the GRP stuff. However, my Vulture still isn't firing. And now that I added the firing animation, I noticed it isn't working either. So, I'm guessing my script isn't executing properly. Maybe it has to do with the fact I used a zergling? Should I choose another unit?



None.

May 24 2011, 7:23 am IskatuMesk Post #13

Lord of the Locker Room

If it's using attackc or whatever was the one that forces no projectiles then yeah, that could potentially be a problem.



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.

May 24 2011, 3:39 pm Drakiazuu Post #14



It had 'attackmelee' but I changed it to this:

Vulture_TurretGndAttkInit:
playfram 0x11
playsnd 70 # Goliath's Attack Sound
attackwith 1
wait 1
playfram 0x00
wait 1
playfram 0x11
wait 1
gotorepeatattk
goto Vulture_TurretLocal00

In theory, this should play the attack animation I made, frameset 1, and attack with weapon one, gauss rifle. Yet it does not..



None.

May 25 2011, 11:47 am IskatuMesk Post #15

Lord of the Locker Room

Are the headers and Type set up properly? (Refer to goliath turret)
Is the unit AI set up properly for both the Vulture and the Turret? Are the flags set up properly? (In units.dat)
Is the turret set to use full iscript in images.dat?

I'm afraid my experience with turrets is not thorough enough to remember much about them after all these years of not touching BW, but if the attack isn't initiating any kind of animation at all it may not have to do with the iscript.



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.

May 27 2011, 2:41 am Drakiazuu Post #16



Figured it out. I had changed the graphics of the zergling to the turret, so I went to the turret's iscript and gave it the attack scripts, and it worked. Apparently only the iscript of the grp file in use matters, even if the unit ID still calls another one. Thanks everyone! :)



None.

May 27 2011, 11:35 am IskatuMesk Post #17

Lord of the Locker Room

I'm guessing you noticed that when you saw images.dat? Yeah, the isid there is pretty important. If you aren't quite sure how it works;

Unit refers to a flingy, flingy refers to a sprite, and the sprite refers to an images.dat entry. That images.dat entry points to an iscript id as well as a grp entry (from images.tbl). The isid is then defined in the actual iscript.



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.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[08:42 pm]
Ultraviolet -- :wob:
[10:09 pm]
Ultraviolet -- let's fucking go on a madmen rage bruh
[10:01 pm]
Vrael -- Alright fucks its time for cake and violence
[2024-5-07. : 7:47 pm]
Ultraviolet -- Yeah, I suppose there's something to that
[2024-5-06. : 5:02 am]
Oh_Man -- whereas just "press X to get 50 health back" is pretty mindless
[2024-5-06. : 5:02 am]
Oh_Man -- because it adds anotherr level of player decision-making where u dont wanna walk too far away from the medic or u lose healing value
[2024-5-06. : 5:01 am]
Oh_Man -- initially I thought it was weird why is he still using the basic pre-EUD medic healing system, but it's actually genius
[2024-5-06. : 3:04 am]
Ultraviolet -- Vrael
Vrael shouted: I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
With the modern EUD editors, I don't think they're calculating nearly as many offsets as you might imagine. Still some fancy ass work that I'm sure took a ton of effort
[2024-5-06. : 12:51 am]
Oh_Man -- definitely EUD
[2024-5-05. : 9:35 pm]
Vrael -- I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
Please log in to shout.


Members Online: Roy