Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Naval Yard tutorial
Naval Yard tutorial [message #486474] Thu, 27 February 2014 02:52 Go to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

This tutorial will show how to set up naval yards.
It assumes you have properly set up boats/subs/naval transports and the various blockers per http://www.renegadeforums.com/index.php?t=msg&th=40639&start=0&
It also assumes you have properly set up the sidebar per http://www.renegadeforums.com/index.php?t=msg&th=40588&start=0&

Ok, so the first thing you will want to know about is the NavalFactoryVehicleLimit keyword in the per-map ini file. This works just like the AirFactoryVehicleLimit and VehicleFactoryVehicleLimit and sets the number of naval vehicles that can be built at once.

Next step is to add the naval units created earlier to the purchase definitions (like any other vehicle). Make sure you set the "factory building type" to "naval factory" when you add them.

Next step is to create spawn zone presets for the naval units. Create one script zone preset for each naval unit type you have. Set the zone type to "Naval Spawn" and the purchase preset to the vehicle preset for the naval vehicle.

Next up, place these zones in your level near your naval buildings. The center point of the zone is the center point where the naval vehicle will spawn so if the vehicle is a sub, this needs to be below the water surface, if its a surface ship it needs to be above the water surface. The size of the zone should match the size of the vehicle it spawns. If there is something in the zone it will not spawn the vehicle (and wont charge the player etc)

The final step is to create the building controllers. These need to be Naval Factory (under Building in LE). Set the building type to "Naval Factory". The timer value controls the amount of time before the naval vehicle spawns (i.e. its a construction delay so naval vehicles don't spawn instantly). The Construction Zone settings need to be set to the zone presets you created above (the ones for each unit type). If you have less than 6 boat types for your naval factory, leave the extra ones blank (if you have more than 6 types of boat, tough, its limited to 6)


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies

[Updated on: Thu, 27 February 2014 03:51]

Report message to a moderator

Re: Naval Yard tutorial [message #486476 is a reply to message #486474] Thu, 27 February 2014 05:22 Go to previous messageGo to next message
Mauler
Messages: 448
Registered: May 2003
Location: Alberta, Canada
Karma: 0
Commander
nice stuff
Re: Naval Yard tutorial [message #486506 is a reply to message #486474] Fri, 28 February 2014 08:37 Go to previous messageGo to next message
Mauler
Messages: 448
Registered: May 2003
Location: Alberta, Canada
Karma: 0
Commander
Do you have to add naval unit to separate purchase entry? or do i have to add them to the vehicles tab?

Also are the blockers and special script collisions needed to make units work? We are trying to make an alternate ground vehicle factory with the naval yard... but the units do not show up in the sidebar..

[Updated on: Fri, 28 February 2014 09:15]

Report message to a moderator

Re: Naval Yard tutorial [message #486509 is a reply to message #486474] Fri, 28 February 2014 13:00 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

The special collision stuff is not strictly necessary, no.
You can add them to the vehicles purchase entry if you like.
As for your problem with them not appearing on the sidebar, get me a test map that shows the problem and I will look into it.


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
Re: Naval Yard tutorial [message #486515 is a reply to message #486474] Sat, 01 March 2014 03:51 Go to previous messageGo to next message
Mauler
Messages: 448
Registered: May 2003
Location: Alberta, Canada
Karma: 0
Commander
here a quick test map... temped the secret vehicles and added a flame tank unit for $1234 and it does not show up on the sidebar..
followed the tutorial minus the collisions/script

test on nod... two controllers on the map stock airstrip and new naval yard type

[Updated on: Sat, 01 March 2014 03:53]

Report message to a moderator

Re: Naval Yard tutorial [message #486521 is a reply to message #486474] Sat, 01 March 2014 05:37 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

I will need the le package for this map to really see whats going on. But i do know the naval yard code has special checks for vehicles of type "boat" and "sub"


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
Re: Naval Yard tutorial [message #486522 is a reply to message #486474] Sat, 01 March 2014 06:52 Go to previous messageGo to next message
Mauler
Messages: 448
Registered: May 2003
Location: Alberta, Canada
Karma: 0
Commander
Here ya go..


http://mauler.ultraaow.com/Mauler-bin/Temp/LevelEdit_TESTMAP2.rar

C&C_Testmap3 is the one i sent you earlier

EDIT: I simply used a stock vehicle preset.. I didn't use Boat or Sub Dont Get It haha maybe that might the case.. i don't know.. Like i said we are trying to get certain ground vehicles made purchasable there instead of the normal WF/Strip

[Updated on: Sat, 01 March 2014 07:08]

Report message to a moderator

Re: Naval Yard tutorial [message #486546 is a reply to message #486474] Sun, 02 March 2014 04:59 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

I can confirm from checking the code that only things with type set to boat or sub will be built at a naval yard.


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
Re: Naval Yard tutorial [message #486547 is a reply to message #486474] Sun, 02 March 2014 05:05 Go to previous messageGo to next message
Mauler
Messages: 448
Registered: May 2003
Location: Alberta, Canada
Karma: 0
Commander
ok after some further testing seems to me like the naval yard logic is not working.. i have the controller,SH script,naval yard purchase and all that but still makes the naval units via cargo plane...

EDIT #2:
So when i actually destroy the naval yard building the "naval" unit disappears.. so that is working just not the actual spawn system

[Updated on: Sun, 02 March 2014 05:48]

Report message to a moderator

Re: Naval Yard tutorial [message #486548 is a reply to message #486474] Sun, 02 March 2014 05:55 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

Does your vehicle have type set to "Boat" or to "Sub"? If not, set it to one of those (you probably want "Boat" unless the thing you are dealing with has VTOL physics in which case you want "Sub")
That's the only thing I know of that would cause what you are seeing.


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
Re: Naval Yard tutorial [message #486549 is a reply to message #486474] Sun, 02 March 2014 05:57 Go to previous messageGo to next message
Mauler
Messages: 448
Registered: May 2003
Location: Alberta, Canada
Karma: 0
Commander
I'm sorry where is this option to set "boat" or "sub" ? I'm confused..

Oops i see it now..

[Updated on: Sun, 02 March 2014 06:00]

Report message to a moderator

Re: Naval Yard tutorial [message #486550 is a reply to message #486474] Sun, 02 March 2014 06:06 Go to previous message
Mauler
Messages: 448
Registered: May 2003
Location: Alberta, Canada
Karma: 0
Commander
I've got it working now... thanks
Previous Topic: Beautiful custom base defense
Next Topic: Custom strings in a mix?
Goto Forum:
  


Current Time: Wed Dec 18 06:59:32 MST 2024

Total time taken to generate the page: 0.01025 seconds