Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Mon Dec 02, 2024 7:38 pm
All times are UTC + 0
Oil Derricks in TS (Old way)
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [13 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Tue Jan 31, 2012 6:19 pm    Post subject:  Oil Derricks in TS (Old way) Reply with quote  Mark this post and the followings unread

UPDATE: There is a much better and easier way to add oil derricks into Tiberian Sun, check out the tutorial here.

I've left this tutorial still here, maybe something can be learned from it and used for other tricks and logics.

-----------------------------------------------------------------------------------------------------------------------------------------------


This tutorial will allow you to add Oil Derrick type of structures to TS. Think I've managed to work out all the problems from this logic now, though if you find any problems with it, please let me know.

To make this work, we need 2 new structures and 2 new units. Let's start with the main part, a structure and vehicle that deploy into each other. Since the "oil derrick" needs to be of size 1x1, I've called them Tiberium Spike instead, just like C&C 3 has Tiberium Spikes. They have small foundation but are very tall.

EDIT:

Do this first in rules.ini:

Code:

MinDamage=0 ;1


Code:

; Tiberium Spike building form
[TIBSPIKEB]
Name=Tiberium Spike
Image=GATICK                ; Put the real image here
Nominal=yes
TechLevel=-1
Strength=1500
Points=50
Cost=1000                   ; Just for XP reward
Power=0
Armor=heavy
Sight=5
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
UndeploysInto=TIBSPIKEV
DeployTime=.0001            ; Doesn't seem to have an effect...
BaseNormal=no
Crewed=no
TickTank=yes
ThreatPosed=0
MaxDebris=10
DamageParticleSystems=SparkSys,BigGreySmokeSys,SmallGreySSys
DamageSmokeOffset=500, 500, 400
Capturable=yes
Unsellable=yes
Repairable=yes
TogglePower=no
Selectable=no               ; Has to be unselectable or the player could order it to undeploy
Insignificant=yes           ; So they blow up when the owning player dies
;Immune=yes                 ; Use this if you want them to be immune to damage
DeploySound=SUBDRIL1        ; If you want a sound effect played when each "tick" happens
UndeploySound=SUBDRIL1
FreeUnit=MONEYSPAWN         ; This gives you the money
IsCoreDefender=yes          ; Makes it immune to EMP

; Tiberium Spike vehicle form
[TIBSPIKEV]
Name=Tiberium Spike
Image=TTNK                   ; Put the real image here
Nominal=yes
Category=Support
Prerequisite=CABHUT
Primary=SpikeDeploy          ; Needed to make it deploy back into TIBSPIKE1
DeployToFire=yes             ; Same as above
DeploysInto=TIBSPIKEB
DeployTime=.0001
Strength=1500
Armor=heavy
TechLevel=-1
Sight=5
Speed=0
Cost=1000
Points=50
ROT=1000 ;0
MovementRestrictedTo=Road    ; Needed to prevent abuse of the logic
Crusher=yes                  ; Needed to prevent abuse of the logic
Crewed=no
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
MaxDebris=10
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
MovementZone=Crusher         ; Needed to prevent abuse of the logic
ThreatPosed=0
DamageParticleSystems=SparkSys,BigGreySmokeSys,SmallGreySSys
Weight=1
AllowedToStartInMultiplayer=no
CrateGoodie=no
NonVehicle=yes               ; So hijackers can't capture it
Selectable=no                ; Has to be unselectable or the player could order it to move
IsCoreDefender=yes           ; Makes it immune to EMP



This building / vehicle combo is the actual Tiberium Spike. But we also need 1 extra structure and vehicle to make this work:

Code:

; Money Spawner vehicle
[MONEYSPAWN]
Name=Rich! I'm rich!
Image=PICK           ; Doesn't matter it never appears ingame
Strength=100
Armor=light
TechLevel=-1
Sight=0
Speed=0
Cost=50              ; This adjusts how much money you get per "tick"
Points=0
ROT=5
Crusher=no
Crewed=no
MaxDebris=0
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
MovementZone=Normal
SpeedType=Winged     ; Key to making the vehicle not appear and give you money instead
ThreatPosed=0
Weight=1
AllowedToStartInMultiplayer=no
CrateGoodie=no
NonVehicle=yes

; Tiberium Spike deployer
[TIBSPIKEDEP]
Name=Tiberium Spike
Nominal=yes
Strength=100
Armor=light
TechLevel=-1
Sight=5
Cost=10000
BaseNormal=no
Points=0
Power=0
Crewed=no
Capturable=false
MaxDebris=0
Primary=SpikeMad
Elite=SpikeMadC      ; Needs to be here to prevent a known crash
Turret=no
ThreatPosed=0
DamageParticleSystems=
HasStupidGuardMode=true
Immune=yes
LegalTarget=no
;InvisibleInGame=yes ; Can't use this, would break the logic. Make it use an empty shp instead.
AIBuildThis=no



MONEYSPAWN is used to give you the money after each "tick". Adjust the cost of it to change how much money you get per "tick". TIBSPIKEDEP is just a hacky building that is required for the logic to work.

Now let's define the remaining rules.ini things, the weapons, projectiles and warheads.

Weapons:

Code:

[SpikeMad]
Damage=0
ROF=12      ; Should be lowish to make the deploying near instant
Range=2     ; Place the Spike Deployer always next to the Tiberium Spike so this range is enough!
ProjectileRange=0
Projectile=SpikeMadPR
Speed=0
Warhead=SpikeMadWH

[SpikeMadC]
Damage=1
ROF=12
Range=0
Projectile=SpikeMadCPR
Speed=100
Warhead=SpikeMadCWH

[SpikeDeploy]
Damage=10
ROF=40
Range=255                ; Max range
Projectile=AAHeatSeeker2 ; Doesn't matter as long as it can target both ground and air
Speed=100
Warhead=AP               ; Doesn't matter as long as all verses are more than 0



Projectiles:

Code:

[SpikeMadPR]
Shadow=no
Proximity=yes
Cluster=1
Ranged=yes
Range=0
AA=no
Image=120MM
ROT=4
Splits=yes
AirburstWeapon=SpikeMadC
IgnoresFirestorm=yes
RetargetAccuracy=100%

[SpikeMadCPR]
Arm=2
High=yes
Shadow=no
Proximity=yes
Ranged=yes
Image=120MM
ROT=8



Warheads:

Code:

[SpikeMadWH]
Spread=0
Verses=0%,0%,0%,0%,0%
InfDeath=0
ProneDamage=0%

[SpikeMadCWH]
Spread=0
Verses=-100%,-100%,-100%,-100%,-100%
InfDeath=0
ProneDamage=-100%
Wall=no
Wood=no
Conventional=no
;AnimList=S_CLSN16 ; Enable this only for testing



I won't even try to explain what goes on here. It uses various tricks to do what is necessary for the vehicle form of the Tiberium Spike to deploy back into the building form. If you have specific questions about any of these, I can answer them.


Next go to art.ini and add this to the building artwork section:

Code:

[TIBSPIKEDEP]
Image=Inviso
Remapable=yes
Foundation=0x0
Buildup=NALASRMK
DemandLoadBuildup=true
FreeBuildup=true
NewTheater=yes
PrimaryFirePixelOffset=0,-13 ; This is very important. Makes the 0-damage appear over the Tib. Spike.



The most important thing here is PrimaryFirePixelOffset. With this you can change the location where the 0-damage is applied. This value requires you to place the TIBSPIKEDEP structure south-east of the Tiberium Spike structure. More on that next.


Now, go to FinalSun map editor. Place the Tiberium Spike (building form) on the map. Next, we need 3 triggers for each Tiberium Spike.








I recommend using 30 or higher values for the deploy trigger event (highlighted in the 1st pic), since the undeploy process can cause problems for missile based weapons. Rather increase the cost of MONEYSPAWN to give you more funds with every "tick". Now, attach the Tiberium Spike 1 Deploy trigger to the Tiberium Spike (building form) that you placed on the map earlier.




Next, place the TIBSPIKEDEP structure south-east of the Tiberium Spike building.




Attach the Tiberium Spike 1 Blow Step 2 trigger to it.




Finally, place a 1x1 piece of pavement exactly under the Tiberium Spike building. Cover the Tiberium Spike building with walls that cannot be destroyed, leaving only 1 entrance to the Spike.



I recommend doing this, otherwise your own units could start firing on the TIBSPIKEDEP structure if they were standing right next to the Spike.


That should cover everything. It has alot of steps, but once you've done all the code, adding Tiberium Spikes to maps only requires you to place the Tiberium Spike and TIBSPIKEDEP structures on the map (with the pavement and walls), then add in the 3 triggers for them. Sorry for not explaining some of the things in the tutorial more specifically, but writing this tutorial took ages as it is. If you have questions about anything just ask them below. I also encourage you to try to abuse / break the logic so I can try to correct any possible problems that might arise.


Key Words: #Tutorials #Modding #Mapping #TiberianSun #Firestorm #Rules.INI #Art.INI #FinalSun 

_________________

Last edited by SuperJoe on Sat Jan 12, 2013 7:25 am; edited 6 times in total

Back to top
View user's profile Send private message
Team Black
Defense Minister


Joined: 25 Sep 2006
Location: Teamblackistan Posts: Over 9000

PostPosted: Tue Jan 31, 2012 11:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

win much??

_________________
The Fall of Hammerfest - Epic Tiberian chain story

Tiberian Odyssey mapping department. Discord
The Team Black Index

Back to top
View user's profile Send private message
Death Cultist
Scorpion Sniper


Joined: 28 Apr 2009
Location: Auckland, New Zealand

PostPosted: Wed Feb 01, 2012 4:00 am    Post subject: Reply with quote  Mark this post and the followings unread

Somebody tell TI, they'll wanna see this.

_________________
Beta Tester for Mental Omega 3.0


Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Feb 01, 2012 8:04 am    Post subject: Reply with quote  Mark this post and the followings unread

They have seen this Wink

@SuperJoe: Could you upload the pictures to ppm? There are already many topics here, where the pictures are lost because of the hoster being offline or because it has deleted them after a month. And it would be a shame if the tutorial would become useless without the pictures.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Wed Feb 01, 2012 1:07 pm    Post subject: Reply with quote  Mark this post and the followings unread

The pictures from this tutorial are now being hosted by PPM.

Back to top
View user's profile Send private message Visit poster's website Skype Account
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Feb 01, 2012 1:20 pm    Post subject: Reply with quote  Mark this post and the followings unread

Thank you.
A big cookie for Banshee. Very Happy

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Wed Feb 01, 2012 4:00 pm    Post subject: Reply with quote  Mark this post and the followings unread

Where can you upload pics to PPM? I can only see the add attachment thingy, and with that the pics always appear at the very bottom of the post. Guess you could link to them directly in the post, but wouldn't they still remain in the bottom too? Is there some other way to upload things on PPM?

I've been using ImageShack and Tinypic before, both seem kinda reliable.

_________________

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Feb 01, 2012 4:25 pm    Post subject: Reply with quote  Mark this post and the followings unread

I thought Banshee gave you already ftp/webspace on ppm due to your mod.
Yes, without ftp-space on ppm, you really have only the attachment possibility.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Krow
Commander


Joined: 30 Jan 2010
Location: Malaysia

PostPosted: Mon Feb 06, 2012 2:59 am    Post subject: Reply with quote  Mark this post and the followings unread

This is just awesome SuperJoe. But I have to ask, how do they work actually?

_________________
Team Black wrote:
interesting seeing your voxel work. They're still better than Aro's!

Back to top
View user's profile Send private message
Nordos
Cyborg Cannon


Joined: 10 Jan 2012
Location: Germany, Berlin

PostPosted: Mon Feb 06, 2012 8:09 am    Post subject: Reply with quote  Mark this post and the followings unread

The unit deploys, the deployedUnit has FreeUnit=MONEYSPAWN, this something has SpeedType=Winged, as its already stated by SuperJoe, this key is making the vehicle not appear and give you money instead. And finally, the trigger are needed to let it deploy indefinitely in a certain 'tick'.

_________________

So, yeah, I've created a new acc. 'cause no one could remember Ordosherrscher - and I didn't like that name anyway.

Back to top
View user's profile Send private message Skype Account
Krow
Commander


Joined: 30 Jan 2010
Location: Malaysia

PostPosted: Mon Feb 06, 2012 5:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

Oh, now I get it. Thanks Nordos. Smile

_________________
Team Black wrote:
interesting seeing your voxel work. They're still better than Aro's!

Back to top
View user's profile Send private message
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Tue Jun 19, 2012 2:01 am    Post subject: Reply with quote  Mark this post and the followings unread

Now that I've worked with map triggers a bit more I realised my old method to do the oil derrick was overly complicated. There is no need for a fake structure to force the vehicle form of the oil derrick to deploy. You only need these (copied from 1st post):

Code:

; Tiberium Spike building form
[TIBSPIKEB]
Name=Tiberium Spike
Image=GATICK                ; Put the real image here
Nominal=yes
TechLevel=-1
Strength=1500
Points=50
Cost=1000                   ; Just for XP reward
Power=0
Armor=heavy
Sight=5
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
UndeploysInto=TIBSPIKEV
DeployTime=.0001            ; Doesn't seem to have an effect...
BaseNormal=no
Crewed=no
TickTank=yes
ThreatPosed=0
MaxDebris=10
DamageParticleSystems=SparkSys,BigGreySmokeSys,SmallGreySSys
DamageSmokeOffset=500, 500, 400
Capturable=yes
Unsellable=yes
Repairable=yes
TogglePower=no
Selectable=no               ; Has to be unselectable or the player could order it to undeploy
Insignificant=yes           ; So they blow up when the owning player dies
;Immune=yes                 ; Use this if you want them to be immune to damage
DeploySound=SUBDRIL1        ; If you want a sound effect played when each "tick" happens
UndeploySound=SUBDRIL1
FreeUnit=MONEYSPAWN         ; This gives you the money
IsCoreDefender=yes          ; Makes it immune to EMP

; Tiberium Spike vehicle form
[TIBSPIKEV]
Name=Tiberium Spike
Image=TTNK                   ; Put the real image here
Nominal=yes
Category=Support
Prerequisite=CABHUT
Primary=SpikeDeploy          ; Needed to make it deploy back into TIBSPIKE1
DeployToFire=yes             ; Same as above
DeploysInto=TIBSPIKEB
DeployTime=.0001
Strength=1500
Armor=heavy
TechLevel=-1
Sight=5
Speed=0
Cost=1000
Points=50
ROT=1000 ;0
MovementRestrictedTo=Road    ; Needed to prevent abuse of the logic
Crusher=yes                  ; Needed to prevent abuse of the logic
Crewed=no
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
MaxDebris=10
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
MovementZone=Crusher         ; Needed to prevent abuse of the logic
ThreatPosed=0
DamageParticleSystems=SparkSys,BigGreySmokeSys,SmallGreySSys
Weight=1
AllowedToStartInMultiplayer=no
CrateGoodie=no
NonVehicle=yes               ; So hijackers can't capture it
Selectable=no                ; Has to be unselectable or the player could order it to move
IsCoreDefender=yes           ; Makes it immune to EMP

; Money Spawner vehicle
[MONEYSPAWN]
Name=Rich! I'm rich!
Image=PICK           ; Doesn't matter it never appears ingame
Strength=100
Armor=light
TechLevel=-1
Sight=0
Speed=0
Cost=50              ; This adjusts how much money you get per "tick"
Points=0
ROT=5
Crusher=no
Crewed=no
MaxDebris=0
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
MovementZone=Normal
SpeedType=Winged     ; Key to making the vehicle not appear and give you money instead
ThreatPosed=0
Weight=1
AllowedToStartInMultiplayer=no
CrateGoodie=no
NonVehicle=yes



Then create a taskforce and script as follows:

Code:

[YOUR_TASKFORCE]
Name=Oil Vehicle
0=1,TIBSPIKEV
Group=-1

[YOUR_SCRIPT]
Name=Oil Deploy
0=9,0  ; Deploy
1=5,1  ; Wait 1 time unit
2=6,1  ; Jump to the 1st line (keeps repeating if the deploy failed)


And finally a teamtype as shown below:




For each oil derrick you need to create a new copy of the teamtype and change the Group of it (as circled in the pic).

That covers the taskforce / script / teamtype, now 2 triggers to finalize this:

For vehicle to deploy into building




For building to undeploy into vehicle




Now place the TIBSPIKEV vehicle onto the map, and adjust it's properties as follows:




And that's it. No need for hacky buildings and crap, just a few map triggers.


Think you could even create just a single teamtype and trigger pair for all oil derricks to use, but it might slow down the game. I mean the neutral AI would constantly try to create the Oil Team teamtype. If you create seperate teams and triggers for each oil derrick, you can stop the constant recruiting by disabling "Oil x Step 1" trigger until the oil derrick actually undeploys.

_________________

Back to top
View user's profile Send private message
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Tue Jun 19, 2012 2:23 am    Post subject: Reply with quote  Mark this post and the followings unread

SuperJoe wrote:
Think you could even create just a single teamtype and trigger pair for all oil derricks to use, but it might slow down the game. I mean the neutral AI would constantly try to create the Oil Team teamtype. If you create seperate teams and triggers for each oil derrick, you can stop the constant recruiting by disabling "Oil x Step 1" trigger until the oil derrick actually undeploys.


After a quick test yeah, you can go with only one teamtype and trigger pair to handle all oil derricks. I really don't know if this would have any meaningful impact on performance. If not, then this would be a very clean way to place as many oil derricks as you wish on a map.

If you want to try this, create only a single Oil Team and give it Group=-1. Make sure all the TIBSPIKEV you place on the map have Group=-1 as well. Then simply remove Action 1s from both Oil Step 1 and Oil Step 2 triggers (the last parts in the trigger screenshots). Also change Oil Step 1 Event timer from 3 to 1.

_________________

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [13 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
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


Powered by phpBB © phpBB Group

[ Time: 0.2330s ][ Queries: 11 (0.0077s) ][ Debug on ]