polla
  • polla
  • 52.25% (Neutral)
  • Private Topic Starter
14 years ago
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
Sponsor
VTULCobra
14 years ago
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).
Rank up!
NewNightmare
14 years ago
or use boat's KindOf?
CivilianVehiclePTBoat
  ; *** ENGINEERING Parameters ***  
  KindOf            = SELECTABLE VEHICLE BOAT
NewNightmare
14 years ago
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
polla
  • polla
  • 52.25% (Neutral)
  • Private Topic Starter
14 years ago
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 ๐Ÿ˜‰
VTULCobra
14 years ago
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.
Rank up!
BR-Alexandre
14 years ago
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
"The Only Way To Have Peace is Prepare for War" <---I forgot who said this...
"Lasers make superior weapons!" <--- Townes
"Laser crusader ready for engagement" <--- Laser Crusader Tank
"Tactical lasers online" <--- Avenger Support Venhice
"Storm climbed mountain" <--- Pathfinder Elite Infantry
"Ready for covert mission" <--- Stealth Fighter Tactical Support
VTULCobra
14 years ago
I will look for it, but i think the campaign battleships are just normal "unmoving" battleships.

Rank up!
VTULCobra
14 years ago
Use this code for the dozer, it's taken from the amphibious transport in the CivilianUnits.ini, from the zero hour directory:

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)
    ;<NO DATA>
  End
  Locomotor         = SET_NORMAL BasicAmphibiousLocomotor
  Behavior               = DestroyDie ModuleTag_07(change this to the dozer)
    ;<NO DATA>
  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

And here is the specific part that makes your unit move on water:

PreferredHeight = 0.1
AllowAirborneMotiveForce = Yes
ZAxisBehavior = SURFACE_RELATIVE_HEIGHT
Appearance = HOVER

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).
Rank up!
polla
  • polla
  • 52.25% (Neutral)
  • Private Topic Starter
14 years ago
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)

Object AmericaVehicleDozer
Locomotor         = SET_NORMAL BasicAmphibiousLocomotor
End

The dozer can move over ground and water, but water doesnt allow me to build

This is the problem ๐Ÿ˜ž

Currently this is the code of the dozer for the map
(DOZER AMPHIBIOUS SKIN)

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
VTULCobra
14 years ago
Still looking for people who've managed and also looking into the codes.
Rank up!
Annihilationzh
14 years ago
You can't directly build on water. You have to use a workaround, like spawning the structure.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
NewNightmare
14 years ago
1)OCL? but how to make a button for an OCL that will cost you money ?
VTULCobra
14 years ago
@Annihilationzh
That's why I'm trying to find the piece of code that says you can't.

@newnightmare
OCL?
Rank up!
NewNightmare
14 years ago
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
VTULCobra
14 years ago
Well everything is possible, but you need some serious coding skills.
Rank up!
NewNightmare
14 years ago
	
Well everything is possible
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.
VTULCobra
14 years ago
You might find something useful in "Beng's Naval Mod".

*Edit

U can't chane unit prices with Map.ini ! gotcha!



Haha, damn it. ^^
Rank up!
NewNightmare
14 years ago
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...
http://www.cnclabs.com/forums/default.aspx?g=posts&m=122994#post122994  cant solve this ;/
VTULCobra
14 years ago
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. ๐Ÿ˜„ ๐Ÿ‘
Rank up!