Posted: Wed Jan 21, 2009 12:19 pm Post subject:
Help
Hey
I'm just posting problems I've had during the development of my mod, and the solutions as I find them, to help budding modders like myself get started.
PROBLEM: The game crashes while attempting to load a map, but not while starting the game.
SOLUTION: It is caused by referencing a new nonexistent object, apparently. What I had done was fail to put AmericaVehicle.ini into INI\object. Do this, and you will not fail as hard as I just have.
PROBLEM: Clone of chinook minus the transport module will not pick up supplies.
SOLUTION: Replace the chinookaiupdate with the supplytruckaiupdate. This seems to work. *confirmed, this is a good way to do it*
PROBLEM: Can upgrades be mutually exclusive?
SOLUTION: Yes, sort of. In cases of object upgrades, they can be made mutually exclusive with the "conflictswith" line. On cases of player upgrades, a solution must be jerry rigged.
PROBLEM: My builder unit will not move!
SOLUTION: Your builder unit must have its locomotor after its dozeraiupdate module. In fact, this be the case with all ai modules.
PROBLEM: What makes a weapon kill units inside a building?
SOLUTION: The code for killing garrisoned units in buildings is inside the weaponobject.ini file. See the flashbang object for an example.
PROBLEM: My units can't research upgrades or build any other units.
SOLUTION: Make sure they have a production update module.
TIP: The SURRENDER damage type can cause the game to crash when used by weapons that are not the ranger flashbang. (Or apparently not! Comment this out!)
TIP: Object names are case sensitive, string names are not!
TIP: Units with artillery weapons shouldn't have the ATTACK_NEEDS_LINE_OF_SIGHT KindOf parameter. Neither should AA units. (That should be neither should dedicated AA units) Last edited by defanatic on Tue Mar 24, 2009 1:51 am; edited 11 times in total QUICK_EDIT
make sure you have a module containing something like
Code:
MaxBoxes = 8
SupplyCenterActionDelay = 2900 ;3000 ; ms for whole thing (one transaction)
SupplyWarehouseActionDelay = 1200 ;1250 ; 875 ; ms per box (many small transactions)
SupplyWarehouseScanDistance = 700 ;350 ; Max distance to look for a warehouse, or we go home. (Direct dock command on warehouse overrides, and no max on Center Scan)
SuppliesDepletedVoice = ChinookVoiceSuppliesDepleted
UpgradedSupplyBoost = 60 ; increase in value of the crates when supply lines has been upgraded
Also make sure "Harvester" is in the kindof's section. _________________ Go to CJ get yo BJ only 2.99 fo a limited time - The Chronicals of BJ written by myself. QUICK_EDIT
Mutually exclusive? Those words seem to contradict themselves. Please elaborate.
Like only 1 side can upgrade something, or all sides can upgrade something? Or only the american sides or the chinese sides? _________________ Please, read the signature rules of the forum. QUICK_EDIT
Bleh. Mutually exclusive, as in if you have one, you cannot have the other.
So say the upgrades "Supersonic Speed" and "Increased Payload" are mutually exclusive. That means if you get Supersonic Speed, you can't get Increased Payload, and visa versa. QUICK_EDIT
Ok, just have the upgrade trigger a commandset swith, in which the new commandset doesn't have the other upgrade, but make sure the upgrade affects everything the player has, so he can't build a new building and get the other upgrade. _________________ Please, read the signature rules of the forum. QUICK_EDIT
Help again! One of my tanks is frozen in space and time. Whenever I build it, it just sits in my war factory (or where the warfac was if I sell it). QUICK_EDIT
Above problem is still occuring, but I haven't worked on it. I suspect it has something to do with the removal of the garrison contain module in the overlord clone.
Anyway, I ran into another problem with a deployable unit.
The deploy unit button is greyed out, suggesting that I do not fulfill the prerequisites or something like that. QUICK_EDIT
check the locomoter first to make sure no crazy values are enetered. If thats fine check the kindofs. If they are good check the modules to make sure none of them conflict IE condition states and such. _________________ Go to CJ get yo BJ only 2.99 fo a limited time - The Chronicals of BJ written by myself. QUICK_EDIT
Urgh. Ok, it seems that my object upgrade buttons don't work with units, only structures. It's rather frustrating, since I can neither have units upgrading on the field or my deployable units work.
I can't seem to find anything wrong, since it is almost identical code to the upgrading of buildings into different ones.
Anyone else run into this problem and fix it? QUICK_EDIT
PROBLEM: My builder unit will not move!
SOLUTION: Your builder unit must have its locomotor after its dozeraiupdate module.
In fact, this is true for all AI modules. The locomotor must be after it.
Quote:
TIP: The SURRENDER damage type can cause the game to crash when used by weapons that are not the ranger flashbang.
I see no reason for this. I tested it in-game and it worked fine.
Quote:
TIP: Units with artillery weapons shouldn't have the ATTACK_NEEDS_LINE_OF_SIGHT KindOf parameter. Neither should AA units.
AA units do have it, I checked the Gattling Tank and the Quad Cannon. If you removed that, it will cause it to fire through buildings at ground units. QUICK_EDIT
Not sure what happened with the surrender thing now. It's so long ago I can't remember it. Maybe I changed something with the projectile at the same time. :S
My rocket guys don't seem to attempt to shoot through buildings at ground units. I'll test that though. QUICK_EDIT
The projectile will probably just collide with the building, but with weapons that has no projectiles, which are bullet based, they can fire through. QUICK_EDIT
How do I remove the explosion effect from deathtype EXTRA_2
Or indeed just exploding. Erm... I have this code!
Behavior = SlowDeathBehavior ModuleTag_05
DeathTypes = ALL -CRUSHED -SPLATTED -EXTRA_2
DestructionDelay = 200
DestructionDelayVariance = 100
FX = FINAL FX_SupplyTruckExplosionOneFinal
OCL = FINAL OCL_ChinaSupplyTruckDeathEffect
End QUICK_EDIT
But there's still an explosion (not a big one, just a bit of smoke).
This also happens with my various 'victory drones', which are designed to do various things without the players' knowledge. It's a bit obvious if they keep exploding.
EDIT: Err... Some of them have lifetime update modules, and no slow death behavior code, but still explode on death. QUICK_EDIT
Is there any other death modules? Also for an invisible dummy unit, it would be good to make in invulnerable to damage (but not unkillable) and remove its damage FX. QUICK_EDIT
Behavior = CreateObjectDie ModuleTag_99
DeathTypes = ALL +EXTRA_2
CreationList = OCL_StealthPloyStageOne
TransferPreviousHealth = Yes ; to transfer health
End
I assume you want to make it spawn that with death type EXTRA_2 only? If so, the death type should be NONE +EXTRA_2. QUICK_EDIT
I have an artillery unit that has a command button that makes it fire (it doesn't fire normally). However, when it shoots, it seems most of the rounds it fires miss or do very little damage.
Secondly, is there some way to get something to count as a "worker", so you can use the next idle worker button to cycle through them? This would be a rather useful interface upgrade for me. 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