PDA

View Full Version : Modding Spellcasters


BlademasterSlsh
06-18-2008, 12:46 PM
Is it possible to make a spell caster that has only 30 energy? Likewise, is it possible to change what unit has what energy upgrades?

DiscipleOfAdun
06-18-2008, 3:01 PM
The only thing you can change with current conventional means is how much energy a spellcaster has AFTER it has researched it's upgrade. OR how much EVERY spellcaster has before the upgrades.

There is no current way apart from editing the SC code to change what unit gets what upgrade.

BlademasterSlsh
06-18-2008, 3:18 PM
Ok, so there is the solution. I make an upgrade for the unit to have 250 after a +220 Energy upgrade. The Energy Upgrade won't have a button to research it, and life goes on as normal. :)

KillerKow
06-18-2008, 3:37 PM
Doesn't work quite like that. You can only specify the default amount that all spellcasters start with, and then the special ones.

BlademasterSlsh
06-18-2008, 3:40 PM
So what your saying is that I would have to make it so that every unit that had an energy upgrade had one that was for +220?

*sigh* Well, I guess I'll have to cut another corner. Still, for future reference would you mind telling me how to create the energy upgrades?

TheNomad
06-18-2008, 3:55 PM
Why don't you just make a certain unit with a DEFAULT 250 energy and have the upgrade research and remove the upg button ? The reverse of your idea which actually works.

BlademasterSlsh
06-18-2008, 4:53 PM
Why don't you just make a certain unit with a DEFAULT 250 energy and have the upgrade research and remove the upg button ? The reverse of your idea which actually works.

Wait, I thought that was what I was saying.

In either case, I don't see how I change it. I see the upgrades in the Exe editor, and all but the "Argus Talisman" have 0 as the energy amount.

And is this the way a Broodling's energy is 180? (I suspect yes)

TheNomad
06-19-2008, 1:51 AM
Well you said to upg to 250 after defaulting it to 220. I said the other way around sorta.
What do you mean about Broodlings ? They don't have energy. They have a timer. Not the same thing. It's displayed as energy for the sake of simplicity.

ForTheSwarm
06-19-2008, 7:07 AM
He actually said upgrading to 250 from a default of 30. The upgrade was +220 energy, not the default amount.

TheNomad
06-19-2008, 7:18 AM
Ah...

BlademasterSlsh
06-19-2008, 7:23 AM
... and now the solution? Where do I edit this?

TheNomad
06-19-2008, 7:54 AM
In Firegraft. Change to Tree view and go to Upgrades->Energy

BlademasterSlsh
06-19-2008, 9:12 PM
Ok, that lets me change the requirements for researching, now how do I change the unit the upgrade is for?

TheNomad
06-20-2008, 2:53 AM
Requirements ???? That's in the DAT requirements tab, not in the EXE Edit tab. The EXE Edit tab has the energy to upgrade to.
And you can't change the unit. It's even more hardcoded than the upgrade.

TheNomad
06-22-2008, 2:47 AM
Did you find a fix for this ?

BlademasterSlsh
06-22-2008, 1:26 PM
I'm thinking...

The reason I brought this up was for the Reapers Time Mines. I ideally want to have it so that they were cast as a spell, since that would remove the need for using the Vultures and it would let the player use more than 3 per unit (as the Q&As say). I may end up still doing this, but changing the energy needed from 30 (last I checked the Timed Mines had a cool down of 30 seconds) to 100 and make them a normal Spellcaster (thus they can throw 2 at one time, and still get more mines). Right now I'm trying to tackle the Building Morphs and the individual Battlecruiser upgrades (which is EXACTLY like the Mutalisk evolution into Guardian or Devourer), so I'm probably going to spend most of this week trying to reverse engineer the Zerg...

TheNomad
06-22-2008, 5:24 PM
Well keep in mind that emulating the Cocoon has disadvantages...
1. you can't replace the grp without messing it up for Mutalisks
2. you can't cancel it otherwise it reverts to a Mutalisk
3. Not 100% sure it works on non-Zerg units and if you set it as Zerg, you'll mess up the food count (since BC's either can't be made without Overlords)

BlademasterSlsh
06-22-2008, 5:42 PM
I've thought about this, and I think I might have to find some unused unit and make a "BC Cocoon", if that's even possible. I've reached the stage in my modding where I've realized I've got to be able to edit iScript or else call my mods good where they are (and they are not good enough where they are).

TheNomad
06-23-2008, 1:37 AM
I've thought about this, and I think I might have to find some unused unit and make a "BC Cocoon", if that's even possible.

If you plan on using FG the old replacement rule will apply "either the original, either your version" and NOT the switcheroo rule where "you can use both, depending on the unit". Unless you go into ASM :) Which will be hell to implement.

Let me get one point across. Think back to other mods and try to remember if anyone attempted any of your ideas. If they haven't, chances are they're not do-able at the moment (or without asm). Also keep in mind that using the modding tools today you can only replace elements and not add\switch one or the other depending on whatever condition. Since I saw a lot of your questions revolve around this concept.

BlademasterSlsh
06-25-2008, 8:52 AM
... My browser just killed my response 3 times in a row... it is getting annoying...

Spell-ish Questions
1) Can a unit other than an SCV/Probe/Drone build buildings? (Trying to get a Nomad to make a Turret)
2) Is it possible to make a building (Turret) cost energy in the above scenario?
3) How can I make it so that a Unit creates a Unit under it (Nomad creates Spidermine) (NOTE: This is NOT the system the Vultures use, I want these Spidermines to cost energy and thus be infinite)
4) How can I get a Unit to "throw" a unit (Reaper throw Time Bomb)

TheNomad
06-25-2008, 11:46 AM
... My browser just killed my response 3 times in a row... it is getting annoying...

Spell-ish Questions
1) Can a unit other than an SCV/Probe/Drone build buildings? (Trying to get a Nomad to make a Turret)
2) Is it possible to make a building (Turret) cost energy in the above scenario?
3) How can I make it so that a Unit creates a Unit under it (Nomad creates Spidermine) (NOTE: This is NOT the system the Vultures use, I want these Spidermines to cost energy and thus be infinite)
4) How can I get a Unit to "throw" a unit (Reaper throw Time Bomb)

1. In theory yes
2. No, only minerals, resources or supply (food\psi\control)
3. Well, if the constructing unit is a flyer, then it shouldn't be much of a problem... though the Terran "system" is to slide the SCV so I suspect the same will happen with the Nomad - but perhaps not. Try it. Though it won't cost energy (see #2)
4. The Reapers throw Time Bombs ? Where did you see that ? And what do you mean by "throwing" ? Something like a Reaver's attack or what ? If that is what you mean, then it isn't possible (without exe modding)

Of course there is a way to achieve #2... but as you guessed, it involves EXE modding. AT MOST !! And notice I said "at most" you can change the scanner sweep unit and turn it into say, a supply depot. Keep in mind the range is unlimited... which means "not building under it". Also keep in mind you'll lose the sweep technology.

If you want it clean, then it will take a lot of modding and about at least 2-3 functions recoded (unless I am forgetting some and there might be more).

... that and iScripting.

BlademasterSlsh
06-25-2008, 12:46 PM
1. In theory yes
I've got to re-examine my theory then...


2. No, only minerals, resources or supply (food\psi\control)


Hum... do you have any recommendation for how to achieve this effect? I'm thinking about the way the Queen makes Broodlings (and I might be able to scrap this ability, since the Guardian now attacks with them)


3. Well, if the constructing unit is a flyer, then it shouldn't be much of a problem... though the Terran "system" is to slide the SCV so I suspect the same will happen with the Nomad - but perhaps not. Try it. Though it won't cost energy (see #2)


I won't mind if it slides.


4. The Reapers throw Time Bombs ? Where did you see that ? And what do you mean by "throwing" ? Something like a Reaver's attack or what ? If that is what you mean, then it isn't possible (without exe modding)

http://starcraft2.com/features/terran/reaper.xml
That pretty much what I mean by throwing... They just chuck 'em in a strait line. These also cost energy.


Of course there is a way to achieve #2... but as you guessed, it involves EXE modding. AT MOST !! And notice I said "at most" you can change the scanner sweep unit and turn it into say, a supply depot. Keep in mind the range is unlimited... which means "not building under it". Also keep in mind you'll lose the sweep technology.

If you want it clean, then it will take a lot of modding and about at least 2-3 functions recoded (unless I am forgetting some and there might be more).

... that and iScripting.

On the bright side, I think I'm getting better at iscripting. Then again, my turrets are crashing when they get to the -45 degree mark...

TheNomad
06-25-2008, 1:59 PM
I've got to re-examine my theory then...
Just modify order 30 and add "OR Current Unit is X" where X is the one posing as the Nomad.

Hum... do you have any recommendation for how to achieve this effect? I'm thinking about the way the Queen makes Broodlings (and I might be able to scrap this ability, since the Guardian now attacks with them)
Won't work, you need a target, and the target dies. If you want, you can scratch off one race and keep that race's supply as power. Though that has some nasty implications too, depending on the race you choose to "remove".
For example, using PSI as energy will mean you need to build a PSI supply building (something other than the pylon and not use the PSI Aura script). The problem with that is, it will only work if it's a Protoss race set for that building. Bleh... I am confusing you, I'll just exemplify.

You want to create a Missile Turret which will require only energy.
Use as "energy" the PSI (the Protoss supply). Make another building, say Stasis Prison, a PSI provider (but not give it any PSI aura script - so just don't change the AI scripts in the AI tab). You will not be able to make a missile turret unless you have a stasis prison built (which generates PSI). HOWEVER since the prison is a toss building, the way you'd build it is different, i.e. warping instead of actually building it. Similar if you'd use Zerg supply.
This is the only way to get a fourth "resource requirement" (so to speak). But this doesn't mean it will useenrgy... it'll just equire multiple supply givers (such as multiple prisons, depending how much PSI you want them to give).

http://starcraft2.com/features/terran/reaper.xml
That pretty much what I mean by throwing... They just chuck 'em in a strait line. These also cost energy.

God... starcraft-source.com is REALLY getting outdated... figured that much since it said the Thor is built by the Factory instead of the SCV... anyway, back to you... You can try this emulation, though it means losing Spawn Broodlings COMPLETELY. Change the broodling count to 1 instead of 2, change their iScript, make them have a wait in the Init header, then a UseWeapon with splash damage. Also make them unselectable (in FG and the Images tab from DatEdit). Also change their targeting to affect buildings and units. Keep in mind this also results in the targeted unit/building INSTANTLY dying, but it's the best you can do without doing EXE modding.


On the bright side, I think I'm getting better at iScripting. Then again, my turrets are crashing when they get to the -45 degree mark...

If GFX Turns is not used, make sure the frames shift by 17 every time and that when it does turn it doesn't turn in such a way to trigger an infinite turn by accident which causes a runaway loop. What I mean is, imagine 360º. Then picture a 90º turn. Then it will turn again every 90º, but turning more than that might make it attempt to switch back 'till it reaches what it wants but never does... I heard that bug in a mod some time ago, don't remember well... not sure if the explanation is perfect but I think you get it. It's basically like me twisting you around so much that you get dizzy and can't stop turning. If it's not that, make sure you're not playing a missing frame. Keep in mind 50 frames means the last frame is 49.

BlademasterSlsh
06-25-2008, 4:42 PM
Just modify order 30 and add "OR Current Unit is X" where X is the one posing as the Nomad.
Ah, now that works. Thanks :)


Won't work, you need a target, and the target dies. If you want, you can scratch off one race and keep that race's supply as power. Though that has some nasty implications too, depending on the race you choose to "remove".

Why would I need a target, cant I make it target Terrain? For that matter, if I just give the Reaper the Broodling ability, modify it so that it shoots terrain, and made it so that instead of spawning Broodlings it made the Time Bomb, wouldn't I have the effect and the energy cost?


For example, using PSI as energy will mean you need to build a PSI supply building (something other than the pylon and not use the PSI Aura script). The problem with that is, it will only work if it's a Protoss race set for that building. Bleh... I am confusing you, I'll just exemplify.

You want to create a Missile Turret which will require only energy.
Use as "energy" the PSI (the Protoss supply). Make another building, say Stasis Prison, a PSI provider (but not give it any PSI aura script - so just don't change the AI scripts in the AI tab). You will not be able to make a missile turret unless you have a stasis prison built (which generates PSI). HOWEVER since the prison is a toss building, the way you'd build it is different, i.e. warping instead of actually building it. Similar if you'd use Zerg supply.
This is the only way to get a fourth "resource requirement" (so to speak). But this doesn't mean it will useenrgy... it'll just equire multiple supply givers (such as multiple prisons, depending how much PSI you want them to give).


... You were right about the loosing me part.
Maybe I'm not coming across clearly enough. I don't want turrets that require energy the way Protoss buildings do. I don't want it to cost supply, minerals, or vespian either. I want it to take 100 energy from the spellcaster that is making it. I'm thinking I will need to scrap an existing spell to do this.



God... starcraft-source.com is REALLY getting outdated... figured that much since it said the Thor is built by the Factory instead of the SCV... anyway, back to you... You can try this emulation, though it means losing Spawn Broodlings COMPLETELY. Change the broodling count to 1 instead of 2, change their iScript, make them have a wait in the Init header, then a UseWeapon with splash damage. Also make them unselectable (in FG and the Images tab from DatEdit). Also change their targeting to affect buildings and units. Keep in mind this also results in the targeted unit/building INSTANTLY dying, but it's the best you can do without doing EXE modding.


I'm assuming, of course, that I could just change the unit used and keep the Broodlings themselves, but loosing the "Spawn Broodling" spell that the Queen has. (See above?)



If GFX Turns is not used, make sure the frames shift by 17 every time and that when it does turn it doesn't turn in such a way to trigger an infinite turn by accident which causes a runaway loop. What I mean is, imagine 360º. Then picture a 90º turn. Then it will turn again every 90º, but turning more than that might make it attempt to switch back 'till it reaches what it wants but never does... I heard that bug in a mod some time ago, don't remember well... not sure if the explanation is perfect but I think you get it. It's basically like me twisting you around so much that you get dizzy and can't stop turning. If it's not that, make sure you're not playing a missing frame. Keep in mind 50 frames means the last frame is 49.

Ok, not sure I understood that.
Heres my understanding about graphics (correct me if I'm wrong).

1) For having something that rotates 360(or looks different ways), you need 17 frames, usually labeled 00-16.
2) Frames 00&01 are the same. So are 02&03, 04&05, so on and so on, with 16 being the only frame without an identical partner.
3) The engine flips one of the identical angles to form its opposite partner.

I've checked my GRP, and they have the required frames. My iscript works right up until -45, at which point it crashes the game, but this doesn't make sense since it is the same as the earlier section with the exception of the frame numbers. If it would crash anywhere, I would expect -90 to be the point (accidentally putting playfram 17 or something...).

Anyway, the attached is the .mpq with the iscript and GRP inside (for the Power Generator).

TheNomad
06-25-2008, 5:50 PM
Why would I need a target, cant I make it target Terrain? For that matter, if I just give the Reaper the Broodling ability, modify it so that it shoots terrain, and made it so that instead of spawning Broodlings it made the Time Bomb, wouldn't I have the effect and the energy cost?
I know you got tired of hearing this... it's hardcoded. The tech code requires a target to kill. It doesn't matter what kind of targeting you assign to the order but the tech itself needs a target. IT MIGHT work without one but if I remember the code right, it won't. Please, stop confusing the targeting flags you see in DatEdit with the ones used by the EXE. There are more than jsut what DatEd has.


... You were right about the loosing me part.
Maybe I'm not coming across clearly enough. I don't want turrets that require energy the way Protoss buildings do. I don't want it to cost supply, minerals, or vespian either. I want it to take 100 energy from the spellcaster that is making it. I'm thinking I will need to scrap an existing spell to do this.
You missed my point completely. Notice I kept mentioning PSI Supply not PSI Aura. When I said that the building requires energy, I didn't mean energy as in PSI Aura energy (pylon radius type), but it was a "quoted" energy, basically requiring PSI supply. Hope that makes more sense... Why do you think I mentioned the Zerg but didn't mention creep ?


I'm assuming, of course, that I could just change the unit used and keep the Broodlings themselves, but loosing the "Spawn Broodling" spell that the Queen has. (See above?)
The unit (Broodling) will still exist, but won't be spawned as such. Only the newly assigned one will be spawned when the weapon effect is used (not when the order itself is used).


Ok, not sure I understood that.
Heres my understanding about graphics (correct me if I'm wrong).

1) For having something that rotates 360(or looks different ways), you need 17 frames, usually labeled 00-16.
2) Frames 00&01 are the same. So are 02&03, 04&05, so on and so on, with 16 being the only frame without an identical partner.
3) The engine flips one of the identical angles to form its opposite partner.

I've checked my GRP, and they have the required frames. My iscript works right up until -45, at which point it crashes the game, but this doesn't make sense since it is the same as the earlier section with the exception of the frame numbers. If it would crash anywhere, I would expect -90 to be the point (accidentally putting playfram 17 or something...).

Anyway, the attached is the .mpq with the iscript and GRP inside (for the Power Generator).

Hmm... There is the simple grp with only 0-31 or 0-16 frames when using GFX turns otherwise each direction will have 17 frames that repeat themselves. (meaning the first frame is identical to the next 16, 17 is identical to the next 16 etc.). I am not 100% sure why the engine has this, but then again, StarCraft is coded weird.

BlademasterSlsh
06-26-2008, 5:36 PM
Ok, managed to get the turret to stop crashing the game (shadow=5 frames. Turret=17 frames. Loosing your mind debugging iscript=priceless), and now I've got an interesting error. The turret turns to the -90 degree mark, then bounces back to 90 degrees.

http://www.mediafire.com/?wj3mmntdybs

Is there something I'm overlooking (I suspect in the iscript) that would keep it from turning full circle?

[Edit] Also looking to make the burrowing Supply Depot. Any recommendations on how to tackle that? (My current line of thought is revolving around either making it flying building, removing it's move commands and making it attackable by ground. The biggest catch is making it so ground units walk over it burrowed and making it attackable by ground-only attackers while it's "burrowed" (flying)... why do I think this might be hard coded...)

TheNomad
06-27-2008, 2:48 AM
lol :) You'd think correctly.

I would say you had more chances of trying to get the building itself to burrow than to get it to liftoff, but make it attackable by ground weapons (which is very much impossible).

On the other hand, the lamest trick I could think of which might have a greater degree of working is using siege mode emulation and change the supply into a building that ha a different grp or anim (seems burrowed) and has smaller dimensions, say 2x2x2x2. That would fix all your problems. I never tried emulating siege mode on a building though, but I'd say it might work. Burrowing is not 100% do-able, though I think I tried it once in 1.13 and crashed cos I was lazy and didn't edit iScript.

Try both. The burrowing idea is easier, though.