Crazy Freaky Turret Behavior (Help!)

Post Reply
Kaoru
Terran SCV Lube Technician
Terran SCV Lube Technician
Posts: 79
Joined: Sat Jun 02, 2007 1:49 pm

Crazy Freaky Turret Behavior (Help!)

Post by Kaoru »

EDIT 2: Well, while my former question hasn't been answered, it's not quite as pressing as my current one, since the former was partially solved, but this one has me stumped. Okay, so: I've been fiddling around in iscript, obviously, as the pictures below demonstrate. I've been further refining the laser battery weapon (Which is currently on the hero Science Vessel - who will not be Magellan - alone, but is an optional add-on for any fleet warship the Terrans may employ in the campaign I'm working on), in order to turn it into less of a rapid-fire laser-scattergun and more of a concentrated stream of laser-y death. With me so far? Coo'.

To this end, I've given the weapon an absurdly short cool-down time - but an attack that is completely ruled by iscript. The weapon is programmed to fire four times in extremely rapid succession, inside of a nobrkcode. However, immediately after the end of the nobrkcode, and before the repeatattk line, it requires between a one-and-one-half-second-to-two-second cooldown. (I've been thinking of extending the nobrkcode to cover that, but it all depends - two seconds when you're unable to move could be devastating if you're overwhelmed by, say, scourges.)

And this was working great - but only while I had 'Attack this 3x3 area' set. Then I moved to 'Fly to target (Don't follow)', and bad things started happening. First off, the fourth attack ceased to launch, the majority of the time - the science vessel would only fire three times, instead of four, and then get stuck in that long cooldown. Sometimes it even only attacked twice - though that seemed to be more when it ran out of targets in its immediate firing-range. So I thought to myself, 'Fine, well, if that's the way you want to play, I'll just work around you!' And so I added an extra 'attack-then-wait' string-combo to the iscript, and lengthened the time between firings.

That worked, sort've. But there were two problems. First, the long lag-time between shots was awkward and unpleasant to deal with. And two, the turret on top of the science vessel detached and floated free from the unit. I've included a screenshot, below the others already posted. For reference, clicking on either the detached, floating turret, the science vessel, or even the air between the two selected the vessel for ordering. And the turret did not move back, no matter what I did. (It still died with the science vessel, however.)

So. Um. Any clues as to what could cause this? I know that it goes away if I remove that extra 'attack' and 'wait' command, but just doing that is sort've unsatisfactory, if the other problem returns. Also, why is it that, if the time between shots is less than seven (With the 'Fly to target, don't follow' option), do shots seem to...blend together? As in, they're fired so rapidly they're treated as one attack. This is all on Fastest game settings, by the way, but I had a '1-10-7-5' (From the very start of the attack) sequence of waits on the old 'scattergun', and all four of the attacks launched. (The last two were pretty close together, admittedly.)

Any assistance would be richly appreciated.







------------------------------------------------------
EDIT: Sorta-kinda fixed the problem. See the post below this one.
Okay. So, I've been doing a lot of .grp, iscript.bin, .dat, .tbl, aiscript.bin, etcetera modification. I've also been playing a lot of games. That's a given. So!
While playing what would otherwise be a regular map (Fall of Kerrigan) on my modified .exe file, I encountered a problem. In the other topic, I mentioned that I gave the vulture a second weapon and a corresponding iscript mod so that he could use it in his regular attacks. Good? Good. It worked great.
For the hero. The hero's the only one that's supposed to have the weapon. The regular vulture does not. I assumed that, since the regular vulture did not possess the weapon, it wouldn't try to use it, and would therefore not trip the 'Playfram' animations that the hero would.
Joke's on me. Not only is the regular vulture trying to use a weapon it doesn't have, it's trying to use it badly.
I have included screenshots below the Magellan-turret screenie. Basically, it's spawning an unselectable control tower over the vulture. This only happens with the regular one, not the hero. My question is: Why? The frames exist for the vulture model, itself. Why, in the name of god, wouldn't it just go through the frame-animation and play the sounds without utilizing the weapon?

And is there any way of ...I dunno, restricting that weapon and its associated sounds and animations to the hero, alone? Mmmph...




OLD POST
---------------------------------------------------------------------------------------
The topic title is actually a little misleading. Scmdraft2 has no difficulty whatsoever in actually telling me that units are equipped with a certain weapon - in this case, it's a converted Science Vessel Hero with a set of ground/air-firing laser batteries, custom weapons built off of an unused weapons.dat entry. They work just fine - my science vessel cheerfully goes along firing its laser batteries at enemies below and above, and (somehow) I even managed to get the flingy of the laser-blast to materialize in the right place (Underneath the ship for the ground attack, and from the top-turret for the air attack). There's just one problem...

It deals zero damage. Now, this isn't always the case - when I set the unit to 'Use Unit Defaults', it reverts back to its proper damage (16, in this case.) But, unfortunately, my science vessel hero is not Magellan, nor does he have 800 health, or zero armor. Thusly, the 'Use default' option is as good as removing the unit from the map entirely - because it'd just look odd to have a Magellan floating around in the midst of everything else that is happening.

Now, it is a sneaking suspicion of mine that something about Staredit/Starforge/etcetera makes it unable to modify the weapon-damage of any non-natural weapon. My question pertains to whether I'm right about this, and, regardless of whether I am or not, if there's any way to get around this annoying little bug. Would packing an updated weapons.tbl file into the map allow it to recognize and alter new weapons, or...no?

EDIT: Just to make it clear. My modified iscript.bin has given the science vessel a functional attack, it uses it. It uses its weapon properly. Scmdraft 2.0 (When loaded with my mod MPQ) shows the weapon, but refuses to allow me to change it's damage or upgrade-increment. Insomuch as any change I make is immediately undone - to that weapon's damage or upgrade stats. Also: Is the SCV's fusion-cutter "0" upgrade hard-coded? I switched out the Fusion Cutter and my new weapon (as a temporary fix) and while I had a weapon that dealt damage, I couldn't change the amount of damage it gained while upgrading (It was stuck at '0'.)
EDIT 1.5: Incidentally, I did set the Fusion Cutter to use Terran Ship Weapon upgrades, in the preceding case, not Unknown60.

EDIT 2: Added screenshots to help demonstrate the problem - taken from the final map of the initial Enslavers campaign. As you can see, the laser-battery weapon works fine when equipped to the base Magellan. But when that 'Use Default Settings' thing is unchecked, it automatically resets the damage to zero. I know it's possible to add new, changeable weapon-data to the registry - I saw it done while looking through the Vision 2 coding, Serena Schezar's weapon maintained its damage and could be altered, even when listed as a "Terran Heavy Valkyrie".

Incidentally, for those curious as to what is happening in the screenies, the Science Vessel is attacking a total of four times with its 3x3-spread (Factor-two) laser battery, at steadily-increasing increments (So that the second shot comes faster than the first, the third faster than the second, and so on.) It's very rough (And, at a base-32 damage thanks to the two-times-16 offered by the factor of two, a little overpowered) but I did the iscripting in about thirty seconds, so, sue me. Also, big thanks to IskatuMesk/Doctor Doack for all of the iscript information he provided, here and at Maplantis.

EDIT 3(AKA, "Goddamn it, how much more do you have to say?!"): Also, I realize this is more of a laser scattergun than a laser battery right now. That is going to change. Eventually. Right now, I'm having too much fun blasting through Enslavers 3b with a single science vessel. Uwee-hee.

EDIT 4: Sorry about that. Turns out that I got the original version of SCMDraft 2, which had a debug error involving damage-changing. I've fixed it now and everything is working fine. Ehe. Feel free to lock this topic, now. Though I may end up posting updates in it. Or not. Whatever works.
You do not have the required permissions to view the files attached to this post.
Last edited by Kaoru on Tue Mar 04, 2008 9:07 am, edited 1 time in total.
Kaoru
Terran SCV Lube Technician
Terran SCV Lube Technician
Posts: 79
Joined: Sat Jun 02, 2007 1:49 pm

Re: Woes of my iscript.bin (Help!) (Partially solved, still need help)

Post by Kaoru »

I fixed my problem. It's a rather short-term solution, though. Basically, I copypasted vulture flingy, sprite, and image data over the Independent Command Center, then created a new iscript ID (999, yay!) that it referred to, and transferred the modified Hero Vulture data over to it - after giving the regular vulture all of its normal stats back. Tested in-game, and it works fine - the Hero vulture uses all of its special stuff, and the regular vulture doesn't create unselectable control towers over itself. It also doesn't try to use weapons it doesn't have.

The inherent problem with this is, there are only so many other files I can convert like that, unless I figure out how to add .dat entries to everything (Except units.dat, of course) with Arsenal Zero. And to be quite honest, that vulture hero isn't even going to be a Player-controlled unit for most of the campaign I'm working on. (You might be able to use him in a section or two, but, otherwise, he's going to be a - hopefully rockin' - NPC.)

So if there's anyone out there who knows of a better long-term solution, I'd love to hear it. To my knowledge, the Independent Command Center is the only one of the 'Unused' unit entries with its own Flingy, Sprite, and Image entries. Most of the other 'Unknown entries I've spotted have been for unit 'remnants', weapons data, or any number of other things. Still, this was a triumph - of sorts. I now have a hero unit that uses a different iscript from its regular counterpart. Whoo. <3

EDIT: Also, props to Brian Cosmiano, whose concept-art of Ian Anduin's vulture was what gave me the idea for the underslung autocannons, and to Auspex Turmalis, creator of the excellent and admirable Antioch campaign, whose good work convinced me that portrait-editing was essential to a fun and interesting campaign.
Last edited by Kaoru on Sun Mar 02, 2008 2:47 pm, edited 1 time in total.
Kaoru
Terran SCV Lube Technician
Terran SCV Lube Technician
Posts: 79
Joined: Sat Jun 02, 2007 1:49 pm

Re: Crazy Freaky Turret Behavior (Help!)

Post by Kaoru »

So, while we're on the subject, I wanted the opinions of the forumgoers, here. (At least in part because I'm not quite feeling brave enough to unveil anything big on Maplantis or any other modding site, at the moment.) So. Pictured below is the current main hero of the campaign. Still undone is his portrait, his voice, and the alteration of his standard, group, and transport wireframes, as well as the assignment of a custom iscript for him. (And anything else I might have forgot - it's possible I'll be making a custom GRP for him to enable him to utilize a melee attack, or for some other reason, and I'll probably be touching up his wireframe at least a little to differentiate it from the standard marine.)

But then there's what you can help me with. I've been deliberating about giving this guy (Whose name, you might notice, you do not know yet) a second weapon. Either a melee attack (as I mentioned), or something else. Maybe a pistol side-arm. (I might or might not create additional animations for that.) Or maybe a grenade launcher, or anything else. And I'd like to hear your suggestions.

The unit's pretty open to alteration, right now. As you can see, about all I've done with this unit, specifically, is to create a new weapon-icon for him to use. And give him a custom rank, and custom weapon-name. As you can see, he's got three times the normal health of a marine, but not quite as much HP as the Jim Raynor 'rine. He's got two armor-points, and a longer sight-range than a standard marine.

The next bit is just lore fluff about the weapon itself, feel free to skip it.
The gun whose icon you're seeing is the D-12 'Skiver' Rifle. It's a step up from the standard C-14 'Impaler' Gauss Rifle, but isn't quite at the level of the heavy-assault E-9. The major refinement on the weapon is the barrel-function. The last part of the barrel actually rotates around the accelerator chamber, enhancing the electromagnetic field that drives the round from the chamber. Specialized dampener rods positioned atop and below the barrel help the wielder to keep the weapon steady and properly aimed while this is occurring, to avoid misfires due to the additional (and often unexpected) motion. In addition to having increased range as compared to the standard C-14 - almost as great as the Impaler has when utilizing U-238 Depleted Uranium rounds - the D-12 also utilizes 8.90mm 'spikes', and can propel them with greater force than the C-14 could ever achieve. In the proper hands, it's a dangerous weapon, though admittedly suffers from increased recoil and a slightly-reduced rate-of-fire when compared to the smaller C-14.

I'm actually a little nervous about trying to animate everything I'd have to, in order to make a melee or sidearm attack look decent. The marine utilizes hundreds of frames, and while I'd likely only have to add in anywhere between thirty-two and sixty-four frames, that's still a substantial number. And entirely altering or creating frames of standard Starcraft quality is far different from designing a new weapon-icon, or even adding machinegun-frames to an existing unit.

Anyhow. Opinions? Ideas? I'm open to suggestions, even if, for time reasons, I may or may not end up scrapping the extra-weapon idea.
EDIT: Feedback on, and criticism on, the weapon-icon, is also welcome. It's the first new one I've ever made, and I'm sure most of you can recognize the templates it draws from.
You do not have the required permissions to view the files attached to this post.
Last edited by Kaoru on Thu Mar 06, 2008 9:00 pm, edited 1 time in total.
Post Reply