Posted: Sun Feb 07, 2010 8:21 am Post subject:
The giga fortress
Ok, the the giga fortress is this massive thing with 4 artillery turrets and anti air missile launching capabilities. It is deployed from a nanocore. While in the uprising it was a boat, now it is a defensive structure.
1) I can make it come from a nanocore
2) I can give it it's anti air missiles
From here, things get shaky. I can give it 2 turrets and 2 artillery weapons no problem. But then it looks dumb, as the other 2 turrets do nothing.
There was another method brought up by the light, in which Fire Base logic would be used, and each turret would be it's own object sitting on the giga fortress. So I took the turrets off of the fortress and gave it FireBase logic, and I could have vehicles garrison it fine. Next step was to make it start off with garrisoned units. Problem was, the tag proposed by my module list crashes the game.
InitialRoster can't be found anywhere with the exception of the module list, however entering things into this doesn't crash WB, but will crash the game upon completion of the giga fortress. The only similair tag I found was InitialPayload, but this crashes WB, as it is not recognized to be in that module.
So I began getting creative, and thought to spawn the turrets via OCL. For OCLs, theres the tag "ContainInParentObject" (or something similair to that) which sounds like it would work perfectly. I set up the OCL just like the doctor ordered: contained in the parent and 4 of em. But an OCL needs to be triggered by an upgrade, and theres 2 ways of giving an object an upgrade. One it tp press a button, but I don't want to do that. This should be user friendly and automatic. The other way is GrantUpgradeCreate.
This is when I learned that object spawned via OCL are never really 'created' as the game puts it, as modules which point to the objects creation don't work. GrantUpgradeCreate doesn't work, and SupplyCenterCreate doesn't work. This is really a thorn in my side, as I have to figure out how to grant an upgrade at the creation of this object without actually being able to reference the creation. Any thoughts?
gyusdfsdfsdf.jpg
Description:
Filesize:
128.03 KB
Viewed:
9782 Time(s)
_________________ Please, read the signature rules of the forum. QUICK_EDIT
After a considerable amount of time tinkering with the code, I've been able to make a giga fortress that deploys, and then you click a single button, and it gets it's 4 turrets. I still have some tinkering to do, as targeting is kinda screwed up on it (porbably because the gortress itself only has an AA weapon), and you can still garrison the fortress with units before you click the button for the turrets. Also, the turrets can die on the fortress. Finally I still want the granting of the turrets to be automatic.
meh.jpg
Description:
Filesize:
122.19 KB
Viewed:
9742 Time(s)
_________________ Please, read the signature rules of the forum. QUICK_EDIT
I've been working on the assumption that a unit can have two turrets maximum, but my understanding is that DaFool has given the Gigafortress here four by adding the turrets by making the turrets contained as individual entities (like individual vehicles) on the main fortress. Not having ever used the unit in IC, I can only suspect that he removed the command allowing the turrets to be de-garrisoned from this unit, having basically the same effect as the Gigafortress having four turrets.
But my knowledge of Gens code is very shaky, so what I'm saying is probably entirely bullshit.. QUICK_EDIT
What Orac is saying is correct. Each individual turret is actually coded as a vehicle, and they are garrisoned on the fortress (see Fire Base coding). This is coded as a building, and you'll need GrantUpgradeCreate and ObjectCreationUpgrade modules in order to get your thing to start off with the additional turrets. (the unit above does this slightly different because of the japanese build method)
Generals allows 2 real turrets and 3 weapons per object. I have not tried to above method on a vehicle yet. _________________ Please, read the signature rules of the forum. QUICK_EDIT
Joined: 16 Dec 2007 Location: Modding other games.
Posted: Sat Oct 09, 2010 8:47 pm Post subject:
Well that puts a big torn in my side as I been wanting to mod Generals about a year ago. I'll just stick with SupCom modding. Thanks anyways. _________________
Quote:
Everybody knows a mod that doesn't update every ten seconds is dead.
IIRC if you look at the Troop Crawler's coding them automatically come with infantry 'garrisoned'...can that be applied to vehicles? (Or make the turrets infantry-type but look like...turrets)
IIRC you can restrict what can garrison and what can't garrison a building in ZH, look at the Tank Bunker for an instance, in ShockWave. _________________ Please, read the signature rules of the forum. QUICK_EDIT
InitialRoster = Crashes the game wih the gigafortress, probably another ill side effect of the JapBuildMethod. On the bright side, I changed what kind of unit is allowed inside to immoble, which I think pretty much fixes the problem of other units entering _________________ Please, read the signature rules of the forum. QUICK_EDIT
Huh? You mean "ContainInsideSourceObject" in OCL doesn't work? Weird, it always has.
What if you used SpawnBehavior like the Stinger Site? It seems to be a similar effect to what the Giga Fortress is. You can always make the turrets have an armour type which makes it take 0% from basically anything. QUICK_EDIT
JJ_, I have gotten the OCL to work, but I tried added the Line InitialRoster = to the garrison module, and that crashes the game. The way the unit is created is what messes up some logic, the structure never realizes it is "created" so to speak. Which is why GrantUpgradeCreate doesn't work. _________________ Please, read the signature rules of the forum. QUICK_EDIT
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum