Posted by: polla - Tuesday, December 27, 2011 7:08:14 AM
Hello all, I would like to know if is possible to build structures on water simply by modifying "map.ini" file
Would be helpful if you could explain to me how to consider a structure as a vehicle, with intent to change the "locomotor", as the line "KindOf = VEHICLE" is not enough
Thank you all for your help
Posted by: VTULCobra - Tuesday, December 27, 2011 8:35:21 AM
You mean like placing a war factory that can build boats, for example? Try placing one in water then change the Z value in the object properties box, raise it until it's over the water (in world builder).
Posted by: NewNightmare - Tuesday, December 27, 2011 10:36:41 AM
or use boat's KindOf?
CivilianVehiclePTBoat
[code] ; *** ENGINEERING Parameters ***
KindOf = SELECTABLE VEHICLE BOAT[/code]
Posted by: NewNightmare - Tuesday, December 27, 2011 11:28:59 AM
Or if youre into modding you could make a building ( the land part) and grand an upgrade which adds a Portable Structure (Over-water part) to it (using overlord as example), and make the Portable contain all the spawn and path points. but it wouldn't work if the building was to be fully build over water. like an anti-boat turret or something. you'd have to experiment with the BOAT kindof of that
P.S Triple post ftw
Posted by: polla - Wednesday, December 28, 2011 10:23:17 AM
First of all thank you very much for your help guys. Let us proceed slowly
The main objective is obviously to create a naval map where dozer builds structures in the water. I'd like to do it by modifing ini files trying to make it a multiplayer map
# 2 This option is best if the buildings would be predefined, but I'd like it to be the player the one who freely build their buildings
# 3 Using the code of the boat is not enough, or maybe i just dont know how to apply it correctly
# 4 That would be a good idea, but first I'd want to test if the dozer can make structures in the water from the beggining
In the last attempt from this afternoon, I made โโa modification in the boat and I have given the values โโof the USA war factory, intending to keep boat's Locomotor (and I dont know how to add Locomotor to structures)
The boat (war factory) floats in the water and I can build it on the land, but it doesnt give me the option to start construction right in to the water, which is the point
Any ideas guys? Thanks to you all [wink]
Posted by: VTULCobra - Wednesday, December 28, 2011 10:48:51 AM
Since you cant build in water normally, you would have to change the structures properties and somehow remove the bit of code that says you can't build on water. I do not know how to do this yet but I'm browsing.
Posted by: BR-Alexandre - Wednesday, December 28, 2011 3:50:35 PM
don't forget dozers can't move on water, make another unit (hovercraft for example) buildable on land with ability to move over water to build the desired structure
VTULCobra try searching for the codes that the campaing battleships use, they don't move and stand over water so you may find what you're searching on his codes
you can't BUILD over water? check the AI's sistems as they sometimes violate game laws and build structures on hills and suplly docks or build 2 structures in same place, you may find something good on his cheats
Posted by: VTULCobra - Thursday, December 29, 2011 2:09:56 AM
I will look for it, but i think the campaign battleships are just normal "unmoving" battleships.
Posted by: VTULCobra - Thursday, December 29, 2011 2:29:55 AM
Use this code for the dozer, it's taken from the amphibious transport in the CivilianUnits.ini, from the zero hour directory:
[code]Object AmphibiousTransport
; *** ART Parameters ***
Draw = W3DModelDraw ModuleTag_01(change this to the dozer)
ConditionState = NONE
Model = AVAMPHIB(change this to the dozer)
Animation = AVAMPHIB.AVAMPHIB ; fans off(NOT SURE)
AnimationMode = MANUAL
Flags = START_FRAME_FIRST
End
ConditionState = OVER_WATER
Model = AVAMPHIB(change this to the dozer)
ParticleSysBone = TreadFX01 AmphibWaveRest
Animation = AVAMPHIB.AVAMPHIB ; fans off(NOT SURE)
AnimationMode = MANUAL
Flags = START_FRAME_FIRST
End
ConditionState = MOVING
Model = AVAMPHIB(change this to the dozer)
; ParticleSysBone = Exhaust01 SteamVent ;Want turned off until better solution or final cut solution is reached
; ParticleSysBone = Exhaust02 SteamVent
ParticleSysBone = Mist01 AmphibDirt
; ParticleSysBone = Mist01 AmphibDirtClods
; ParticleSysBone = TreadFX01 RocketBuggyDust
Animation = AVAMPHIB.AVAMPHIB ; fans on(NOT SURE)
AnimationMode = LOOP
Flags = START_FRAME_FIRST
End
ConditionState = MOVING OVER_WATER
Model = AVAMPHIB(change this to the dozer)
; ParticleSysBone = Exhaust01 SteamVent
; ParticleSysBone = Exhaust02 SteamVent
ParticleSysBone = Mist01 AmphibMist
ParticleSysBone = Mist02 AmphibMist
ParticleSysBone = Mist03 AmphibMistSide
ParticleSysBone = Mist04 AmphibMistSide
ParticleSysBone = TreadFX01 AmphibWave
ParticleSysBone = TreadFX02 AmphibWave
Animation = AVAMPHIB.AVAMPHIB ; fans on(NOT SURE)
AnimationMode = LOOP
Flags = START_FRAME_FIRST
End
End
; The exit door
Draw = W3DModelDraw ModuleTag_02(NOT SURE)
DefaultConditionState
Model = AVAMPHIB_A(change this to the dozer)
Animation = AVAMPHIB_A.AVAMPHIB_A(NOT SURE)
AnimationMode = MANUAL
Flags = START_FRAME_FIRST
End
ConditionState = DOOR_1_OPENING
Model = AVAMPHIB_A(change this to the dozer)
Animation = AVAMPHIB_A.AVAMPHIB_A(NOT SURE)
AnimationMode = ONCE
Flags = START_FRAME_FIRST
End
ConditionState = DOOR_1_CLOSING
Model = AVAMPHIB_A1(change this to the dozer)
Animation = AVAMPHIB_A1.AVAMPHIB_A1(NOT SURE)
AnimationMode = ONCE
Flags = START_FRAME_FIRST
End
End
; ***DESIGN parameters ***
DisplayName = OBJECT:AmphibiousTransport(change this to the dozers name)
EditorSorting = VEHICLE(LEAVE IT)
CommandSet = CivilianTransportCommandSet(change this to the dozers command set)
ArmorSet
Armor = TruckArmor
DamageFX = DefaultDamageFX
End
WeaponSet
Conditions = None
Weapon = PRIMARY None
End
VisionRange = 150(change this to the dozer)
CrusherLevel = 1 ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles(change this to the dozer)
CrushableLevel = 3 ;What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles
; *** AUDIO Parameters ***
SoundMoveLoop = AmphibiousTransportMoveLoop
(you can leave this if you want it to sound like an amphibious)
; *** ENGINEERING Parameters ***
KindOf = SELECTABLE VEHICLE TRANSPORT(change this to the dozer)
Body = ActiveBody ModuleTag_03(change this to the dozer)
MaxHealth = 100.0(change this to the dozer)
InitialHealth = 100.0(change this to the dozer)
End
Behavior = TransportContain ModuleTag_04(change this to the dozer)
Slots = 8(change this to the dozer)
AllowInsideKindOf = INFANTRY VEHICLE(change this to the dozer)
DoorOpenTime = 2000(change this to the dozer)
ScatterNearbyOnExit = No ; I have bones for exiting(change this to the dozer)
End
Behavior = PhysicsBehavior ModuleTag_05(change this to the dozer)
Mass = 30.0(change this to the dozer)
End
Behavior = TransportAIUpdate ModuleTag_06(change this to the dozer)
;
End
Locomotor = SET_NORMAL BasicAmphibiousLocomotor
Behavior = DestroyDie ModuleTag_07(change this to the dozer)
;
End
Behavior = CreateObjectDie ModuleTag_08(change this to the dozer)
DeathTypes = ALL
CreationList = OCL_GenericCarExplode
End
Behavior = FXListDie ModuleTag_09(change this to the dozer)
DeathTypes = ALL -FLOODED(change this to the dozer)
DeathFX = FX_GenericCarExplode
End
Behavior = FlammableUpdate ModuleTag_21
AflameDuration = 5000 ; If I catch fire, I'll burn for this long...
AflameDamageAmount = 5 ; taking this much damage...
AflameDamageDelay = 500 ; this often.
End
Geometry = BOX
Scale = 0.7 ;Scaling
GeometryIsSmall = No
GeometryMajorRadius = 23.0
GeometryMinorRadius = 17.0
GeometryHeight = 20.0
Shadow = SHADOW_VOLUME
End[/code]
And here is the specific part that makes your unit move on water:
[code]PreferredHeight = 0.1
AllowAirborneMotiveForce = Yes
ZAxisBehavior = SURFACE_RELATIVE_HEIGHT
Appearance = HOVER
[/code]
I am not sure about everything that needs to be changed in the code, but you'll figure it out.
Hope it helps a little, still trying to figure out how to make "floating buildings" (make the dozer build on water).
Posted by: polla - Thursday, December 29, 2011 3:38:03 AM
Thanks again guys
The first thing I did was change the Locomotor of each unit
I work with "map.ini files" so its enough with this code for the dozer
(BASIC CODE)
[code]Object AmericaVehicleDozer
Locomotor = SET_NORMAL BasicAmphibiousLocomotor
End[/code]
The dozer can move over ground and water, but [b]water doesnt allow me to build[/b]
This is the problem [sad]
Currently this is the code of the dozer for the map
(DOZER AMPHIBIOUS SKIN)
[code]Object AmericaVehicleDozer
Locomotor = SET_NORMAL BasicAmphibiousLocomotor
ReplaceModule ModuleTag_01
Draw = W3DTruckDraw ModuleTag_01_Override
ConditionState = NONE
Model = AVAMPHIB
Animation = AVAMPHIB.AVAMPHIB ; fans off
AnimationMode = MANUAL
Flags = START_FRAME_FIRST
End
ConditionState = OVER_WATER
Model = AVAMPHIB
ParticleSysBone = TreadFX01 AmphibWaveRest
Animation = AVAMPHIB.AVAMPHIB ; fans off
AnimationMode = MANUAL
Flags = START_FRAME_FIRST
End
ConditionState = MOVING
Model = AVAMPHIB
; ParticleSysBone = Exhaust01 SteamVent ;Want turned off until better solution or final cut solution is reached
; ParticleSysBone = Exhaust02 SteamVent
ParticleSysBone = Mist01 AmphibDirt
; ParticleSysBone = Mist01 AmphibDirtClods
; ParticleSysBone = TreadFX01 RocketBuggyDust
Animation = AVAMPHIB.AVAMPHIB ; fans on
AnimationMode = LOOP
Flags = START_FRAME_FIRST
End
ConditionState = MOVING OVER_WATER
Model = AVAMPHIB
; ParticleSysBone = Exhaust01 SteamVent
; ParticleSysBone = Exhaust02 SteamVent
ParticleSysBone = Mist01 AmphibMist
ParticleSysBone = Mist02 AmphibMist
ParticleSysBone = Mist03 AmphibMistSide
ParticleSysBone = Mist04 AmphibMistSide
ParticleSysBone = TreadFX01 AmphibWave
ParticleSysBone = TreadFX02 AmphibWave
Animation = AVAMPHIB.AVAMPHIB ; fans on
AnimationMode = LOOP
Flags = START_FRAME_FIRST
End
OkToChangeModelColor = Yes
End
End
AddModule
Draw = W3DModelDraw ModuleTag_01
OkToChangeModelColor = Yes
AttachToBoneInAnotherModule = Dum_Turret
DefaultConditionState
Model = AVCONSTDOZ
ParticleSysBone = EXHAUSTFX01 DozerSmokeLight
WaitForStateToFinishIfPossible = TRANS_DIGGING
End
ConditionState = PREATTACK_A
Animation = AVCONSTDOZ_A.AVCONSTDOZ_A
AnimationMode = ONCE
ParticleSysBone = EXHAUSTFX01 DozerSmokeHeavy
ParticleSysBone = DIRTFX01 DozerDirtFall ;gush of dirt
TransitionKey = TRANS_DIGGING
End
ConditionState = MOVING
ParticleSysBone = EXHAUSTFX01 DozerSmokeHeavy
WaitForStateToFinishIfPossible = TRANS_DIGGING
End
ConditionState = REALLYDAMAGED RUBBLE
Model = AVCONSTDOZ_AD
ParticleSysBone = EXHAUSTFX01 DozerSmokeHeavy
WaitForStateToFinishIfPossible = TRANS_DIGGING_DAMAGED
End
ConditionState = PREATTACK_A REALLYDAMAGED RUBBLE
Model = AVCONSTDOZ_AD
Animation = AVCONSTDOZ_AD.AVCONSTDOZ_AD
AnimationMode = ONCE
ParticleSysBone = EXHAUSTFX01 DozerSmokeHeavy
TransitionKey = TRANS_DIGGING_DAMAGED
End
ConditionState = MOVING REALLYDAMAGED RUBBLE
Model = AVCONSTDOZ_AD
ParticleSysBone = EXHAUSTFX01 DozerSmokeHeavy
WaitForStateToFinishIfPossible = TRANS_DIGGING_DAMAGED
End
OkToChangeModelColor = Yes
End
End
Scale = 0.7
End
[/code]
Posted by: VTULCobra - Thursday, December 29, 2011 4:21:42 AM
Still looking for people who've managed and also looking into the codes.
Posted by: Annihilationzh - Thursday, December 29, 2011 6:25:57 AM
You can't directly build on water. You have to use a workaround, like spawning the structure.
Posted by: NewNightmare - Thursday, December 29, 2011 6:47:04 AM
1)OCL? but how to make a button for an OCL that will cost you money ?
Posted by: VTULCobra - Thursday, December 29, 2011 6:59:46 AM
@Annihilationzh
That's why I'm trying to find the piece of code that says you can't.
@newnightmare
OCL?
Posted by: NewNightmare - Thursday, December 29, 2011 7:05:06 AM
2)how to spawn a building with a button anyway (i.e without construction process)
3)Can't you make a kindof = BOAT based unit with 0 speed locomotor and give it building properties? (but then, can you make BOAT units to be built by a dozer?)
I've seen a map (some GLA vs USA) where a guy made US warfactory create them rangers on snowmobiles as water units
Posted by: VTULCobra - Thursday, December 29, 2011 7:07:52 AM
Well everything is possible, but you need some serious coding skills.
Posted by: NewNightmare - Thursday, December 29, 2011 7:13:44 AM
[code]
Well everything is possible[/code]
U can't chane unit prices with Map.ini ! gotcha!
OCL is the Object Creation List ini file, it contains all the spawning code (like rebel ambushes, China artillery MOAB, all units' death effects etc.
Posted by: VTULCobra - Thursday, December 29, 2011 7:14:45 AM
You might find something useful in "Beng's Naval Mod".
*Edit
[quote]U can't chane unit prices with Map.ini ! gotcha![/quote]
Haha, damn it. ^^
Posted by: NewNightmare - Thursday, December 29, 2011 8:36:43 AM
I dont think naval mods include buildings FULLY on water
the docks are built partly on land, making them require only standard building settings (from what I recall you can build docks in the middle of the base, and any boats made will just 'hover' to the water)
Making units should be pretty easy, so, making building-like units should be possible (you can make a mobile bunker, why not a mobile war factory? do the kindofs block locomotors?
I can't access C&C gen atm...
[url=http://www.cnclabs.com/forums/default.aspx?g=posts&m=122994#post122994]http://www.cnclabs.com/forums/default.aspx?g=posts&m=122994#post122994[/url] cant solve this ;/
Posted by: VTULCobra - Thursday, December 29, 2011 8:53:34 AM
About your C&C Generals not working, does that include Zero Hour? Don't re-install, just remove it completely.
When it's completely removed go to Start -> Search, and search for "zero hour" and "generals" and delete all files that shows up, after you've deleted them, search for it again, sometime some files get left behind. After that, install the game again, this could work for you, it works for me every time i mess the game up. [smile] [+1]