Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Release Forum » [SSGM 4.0 Plugin] Building Revival Console Commands v2.0
[SSGM 4.0 Plugin] Building Revival Console Commands v2.0 [message #482927] Fri, 02 August 2013 10:22 Go to previous message
iRANian is currently offline  iRANian
Messages: 4308
Registered: April 2011
Karma:
General (4 Stars)
BuildingRevivalConsoleCommands SSGM 4.0 plugin v2.0

This plugin adds console commands for reviving buildings to the FDS. There are console commands for every building and two special console commands to revive a building by preset name and by object ID. Reviving buildings on maps with multiple buildings of the same type (e.g. two Obelisk) is supported too. Note there are two issues with this plugin, an inconvenient one requiring clients to rejoin the server and a potential issue on servers or maps running special scripts/code on buildings (e.g. custom repair scripts). These issues are explained in the following paragraphs.

If during building revival after the building is restored the Ref is alive and harvester is dead a new harvester will be requested. All console commands except ReviveBuildingByID will revive the first dead building found of a type. If there are two Obelisks on the map the first dead one will be revived when these commands are executed. ReviveBuildingByID will revive a building by its ID so you can use it to decide what building to revive if there are multiple structures with the same preset name.

The plugin handles the Obelisk and AGT weapons correctly now (in v1.0 they were bugged). After reviving the building any object create hooks are executed for the building. You need to make sure the code on the server supports this properly. For example code that assumes a building only gets the object create hook called for it only once per level load might act up.

The building revival code does a bit of hackery to make sure the right scripts are attached to the building when it is revived (and hopefully in the right state). This might break special scripts on buildings like the building repair scripts on buildings on C&C_Cairo and custom code attaching scripts to buildings, beware.

ON MAPS WITH SPECIAL REPAIR SCRIPTS ON BUILDINGS REVIVING A BUILDING WILL PROBABLY BREAK THE REPAIR SCRIPT. THIS HAPPENS ON C&C_Cairo FOR EXAMPLE.

After reviving a building I've noticed the following bugs appearing on clients:
1.) If the building is destroyed again no death announcement is played.
2.) If the building is a production facility clients can't build from that facility anymore
3.) If the building is a Communication Centre which controls radar, the radar will stay off-line

These bugs go away after the client restarts his game. They happen because the client doesn't sync the 'is destroyed' setting for a building with the server after building revival (on the server the building is no longer destroyed but on clients it's still destroyed). Hopefully TT will add the following client-side fix I wrote to Scripts 4.0 patch 2:
http://www.renegadeforums.com/index.php?t=msg&th=40362&start=0&rid=2 5967#msg_num_12

All revive console commands except ReviveBuildingByPreset and ReviveBuildingByID might not be able to revive a building type or they might REVIVE THE WRONG BUILDING TYPE on CUSTOM MAPS WITH REALLY NON-STANDARD BUILDING PRESET NAMES OR BUILDING TYPE SET ON BUILDING. If that's the case use ReviveBuildingByPreset or ReviveBuildingByID. I HAVEN'T SEEN THIS HAPPEN YET BUT IT IS A POSSIBILITY.

One way to get the object ID of a building is by opening the map in LevelEdit, checking the ID set on the building controller for that building.

The following console commands are added by this plugin:

REVIVEBUILDINGBYID <OBJECTID> - Revives a building by its object ID.
REVIVEBUILDINGBYPRESET <PRESET NAME> - Revives a building by its preset name.

REVIVEBAR - Revives the GDI Barracks.
REVIVEHON - Revives the Hand of Nod.
REVIVEGDIPP - Revives the GDI Power Plant.
REVIVENODPP - Revives the Nod Power Plant.
REVIVEGDICONYARD - Revives the GDI Construction Yard.
REVIVENODCONYARD - Revives the Nod Construction Yard.
REVIVEGDIREF - Revives the GDI Refinery.
REVIVENODREF - Revives the Nod Refinery.
REVIVEGDIREPBAY - Revives the GDI Repair Bay.
REVIVENODREPBAY - Revives the Nod Repair Bay.
REVIVEWF - Revives the GDI Weapons Factory.
REVIVEAIR - Revives the Nod Airstrip.
REVIVEGDICOMMCENTER - Revives the GDI Communications Center.
REVIVENODCOMMCENTER - Revives the Nod Communications Center.
REVIVEAGT - Revives the GDI Advanced Guard Tower.
REVIVEOB - Revives the Nod Obelisk.
REVIVENODSILO - Revives the Nod Tiberium Silo.
REVIVEGDISILO - Revives the GDI Tiberium Silo.
REVIVENODHELIPAD - Revives the Nod Helipad.
REVIVEGDIHELIPAD - Revives the GDI Helipad.
REVIVESHRINE - Revives the Shrine of Nod.


To install place 'BuildingRevivalConsoleCommands.dll' in the root FDS folder and add an entry for it in SSGM.ini under the [Plugins] section.

You can contact me by PM'ing me on renegadeforums.com under the name "iRANian" or on the usual IRC servers under the nick "Iran".


Long time and well respected Renegade community member, programmer, modder and tester.

Scripts 4.0 private beta tester since May 2011.

My Renegade server plugins releases

[Updated on: Sun, 04 May 2014 13:06]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: MapFix Plugin
Next Topic: RenList 1.0.9
Goto Forum:
  


Current Time: Fri Dec 27 11:21:43 MST 2024

Total time taken to generate the page: 0.01084 seconds