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 Tue Apr 23, 2024 6:27 am
All times are UTC + 0
Make units drop ore when destroyed
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [45 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
fx3_hdrive
Vehicle Drone


Joined: 19 Jan 2008
Location: UK

PostPosted: Sat Jan 19, 2008 2:26 pm    Post subject:  Make units drop ore when destroyed
Subject description: Im trying to change the resource system a little
Reply with quote  Mark this post and the followings unread

Hello everyone.
first post and all that... you know. I did some searching but I'm not exactly sure what to search for, there isn't any mod that i know of that changes ore characteristics. Please forgive me if my answers are in some obvious place that i missed.

So to the problem. I would like to have unit spawn little bits of ore upon their destruction, thus giving the defender that extra little credit for fending off the attacker. This has been used in a game called BattleZone (first version) to create an extremely balanced gameplay, linking resource management directly to battle.

Well enough ramble now. I was thinking of giving a vehicle a death weapon that shoots ore ? or maybe make debris ore ?

(I'm using Tib*d ooooonly for its manual editor, please please please dont scream at me)

Back to top
View user's profile Send private message Skype Account
Team SomeGuy
General


Joined: 18 Aug 2006

PostPosted: Sat Jan 19, 2008 4:16 pm    Post subject: Reply with quote  Mark this post and the followings unread

I know you could do this in TS, so I know what your shooting for.

You want stuff when destroyed to leave a "harvestable debris" no? In your case for simplicity, just raw ore.

Ill need to look up my TS ini files real quick to find it but I am pretty sure you can enable some units to "drop" ore when killed.

EDIT: Also GTFO of TibEd. Its not known for its reliability. Just change it manually in the inis. Sorry, but I had to scream at ya.

Back to top
View user's profile Send private message
fx3_hdrive
Vehicle Drone


Joined: 19 Jan 2008
Location: UK

PostPosted: Sat Jan 19, 2008 4:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hey, i totally understand problems with Tibed, really, and I'm not planing to ditch it very soon.

And yes, thats exactly what I'm aiming for, IIRC in TS if you destroy a full harvester it would explode and drop tiberium everywhere. I would like it to drop half its unit cost as ore (same for buildings). (i don't think its possible with aircraft, is it? They crash down to the ground when destroyed). There will be a problem with naval units.

I dont have TS installed so i couldn't look in the ini's.

Thanks for your help

_________________
--
To have faith in others, is first to have faith in yourself

Back to top
View user's profile Send private message Skype Account
Crimsonum
Seth


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Sat Jan 19, 2008 4:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

TiberiumHeal=yes made units spawn Tiberium if killed in TS.

_________________


Back to top
View user's profile Send private message
fx3_hdrive
Vehicle Drone


Joined: 19 Jan 2008
Location: UK

PostPosted: Sat Jan 19, 2008 4:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

How about adding:
Code:
IsTiberium=true

to TIRE debris that comes out of harvester?

Back to top
View user's profile Send private message Skype Account
Dutchygamer
President


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Sat Jan 19, 2008 5:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

Some mods have this feature, so it's possible. If you have TS, I suggest looking at the Meteor code, to find some usefull tags Wink

Back to top
View user's profile Send private message Send e-mail Skype Account
fx3_hdrive
Vehicle Drone


Joined: 19 Jan 2008
Location: UK

PostPosted: Sat Jan 19, 2008 5:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

TiberiumHeal=yes didnt work, neither did setting IsTiberium=true on debris.

Dutchygamer, you say it is possible in some mods, can you name any you have came across ?

I dont have TS, I can only see remnants of Meteor code in RA2 YR.

Is there some tutorial explaining the hierarchy of the ini files? So far i can understand the unit > Weapon > Projectile > Warhead connections, but what about the ore? the ore drill isnt a building. How is it creating Ore? i would thought it would be firing ore as a weapon, but i think its much more complex.

An alternate solution would be to spawn a "crate" type object every time a unit is destroyed. I don't know how to link it to the cost of the unit though

Back to top
View user's profile Send private message Skype Account
Ickus
General


Joined: 25 Nov 2002
Location: @__@

PostPosted: Sat Jan 19, 2008 8:49 pm    Post subject: Reply with quote  Mark this post and the followings unread

http://www.modenc.renegadeprojects.com/Main_Page

check that out.

..the ore drills is a "Tree". or Terrain object. and no adding IsTiberium= won't work.

anyways. what you want lies in the Art.ini it should have a list of various tags there...so if TibEd removes them..I never used it..use Wordpad.

What your looking for is something along the lines of TiberiumToSpawn= or similar tag you add to the debris piece entry in there.

Then you list the name of the overlay entry it will spawn..ie [TIB01]..etc..make sure its a flat one, none of the angled tiberium images (cut from RA2). 1-12 I recall should work. anything over might crash on you..not sure.

also overlays are not the same as terrain objects they are usually walls, rocks and ore/gems/tiberium. etc

_________________
Delirium..

Back to top
View user's profile Send private message
fx3_hdrive
Vehicle Drone


Joined: 19 Jan 2008
Location: UK

PostPosted: Sun Jan 20, 2008 2:37 am    Post subject: Reply with quote  Mark this post and the followings unread

I see what you are getting at. Ive been digging around this all evening now, Ive found TiberiumToSpawn=TIB01 on some other code, so i know thats correct, but you said to add this tag to the debris piece in art.ini? as far as Tibed tels me, Debris types are stored in RulesMD.ini ? am i wrong?

I cannot find any reference from debris type to overlay objects at all. And is tag IsTiberium=true needed? I saw it on the meteor code, labeled Meteor impact debris.

Thanks for help, in meantime im going to try some things with this.

Back to top
View user's profile Send private message Skype Account
fx3_hdrive
Vehicle Drone


Joined: 19 Jan 2008
Location: UK

PostPosted: Sun Jan 20, 2008 6:47 pm    Post subject: Reply with quote  Mark this post and the followings unread

Ok, I have messed around with this for a bit, and it sort of works.

this is my code for TIRE debris, (hooked up to War Miner i use for testing)

Code:
[TIRE]
Name=Flying Tire
Elasticity=0.8
MinAngularVelocity=12.0
MaxAngularVelocity=24.0
MinZVel=28.0
MaxZVel=32.0
MaxXYVel=10.0
Duration=150
IsTiberium=true
TiberiumSpawnType=TIB01


When the miner is destroyed, Tire voxels fly out of it, after they land there will be a single square of ore. See attached screenshot

So it does work. now i just have to figure out how to make it more stable, so that there is a nice amount of ore left, about 500 or something.
Would it possible to make it relative to the cost of the unit?



SCRN0001.png
 Description:
First harvester destroyed, Note the wheel debris is present.
 Filesize:  257.23 KB
 Viewed:  7941 Time(s)

SCRN0001.png



SCRN0002.png
 Description:
These are the locations of ore tiles, sometimes if you are lucky the ore might hit the same tile and it would be more visible. I know ore is there because it can be targeted by another harvester just north.
 Filesize:  403.91 KB
 Viewed:  7941 Time(s)

SCRN0002.png



_________________
--
To have faith in others, is first to have faith in yourself

Back to top
View user's profile Send private message Skype Account
Ickus
General


Joined: 25 Nov 2002
Location: @__@

PostPosted: Sun Jan 20, 2008 7:04 pm    Post subject: Reply with quote  Mark this post and the followings unread

unforunately theres not really a way to scale up the value specifically but theres other codes like spawn radius and such that might get to what you want.

Rather than tire you can create a new animation that looks more like a ore fragment. CRYSTAL animations are good candidates.

_________________
Delirium..

Back to top
View user's profile Send private message
Bos187
Disk Thrower


Joined: 25 Jan 2007
Location: Maastricht, The Netherlands

PostPosted: Sun Jan 20, 2008 9:18 pm    Post subject: Reply with quote  Mark this post and the followings unread


_________________

Back to top
View user's profile Send private message Skype Account
fx3_hdrive
Vehicle Drone


Joined: 19 Jan 2008
Location: UK

PostPosted: Mon Jan 21, 2008 7:10 pm    Post subject: Reply with quote  Mark this post and the followings unread

Ok well ive extraced the MOD that Bos187 suggested, and indeed it has a unit which explodes in little flying bits of ore, it is very nice and just how i want it. The unit which explodes with tiberium is a cyborg from TS (the mod combines units from TS into RA2 YR.

Here is the code from [TSCYBORG]:
Code:
; TS Cyborg
[TSCYBORG]
UIName=name:TSCYBORG
Name=Cyborg
Category=Soldier
Prerequisite=TSNAHAND
Primary=TSVulcan3
ElitePrimary=TSVulcan3E
Crushable=no
TiberiumProof=yes
Fearless=yes
Cyborg=yes
Pip=white
Strength=300 ; w350
Armor=light
TechLevel=3
Sight=6
Speed=4
Teleporter=yes ; significa que puede teletransportarse con la chrono-esfera...
Owner=Confederation,Arabs
AllowedToStartInMultiplayer=no
Cost=600
Soylent=200
Points=5
CrushSound=InfantrySquish
VoiceSelect=TSCyborgSelect   ;These only work if you added the sound stuff correctly
VoiceMove=TSCyborgMove
VoiceAttack=TSCyborgAttack
VoiceFeedback=
VoiceDie=TSCyborgDie2
DieSound=TSCyborgDie2
Locomotor={4A582744-9839-11d1-B709-00A024DDAFD1}
PhysicalSize=1
MovementZone=Infantry
DamageParticleSystems=SparkSys
ThreatPosed=15   ; This value MUST be 0 for all building addons
ImmuneToVeins=yes
VeteranAbilities=STRONGER,FIREPOWER,ROF,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
Size=2;1
LeadershipRating=6
ImmuneToPsionics=yes
ImmuneToPsionicWeapons=no
SelfHealing=yes
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
IFVMode=0;2
;Parasiteable=no
AIBuildthis=yes
DebrisAnims=CRYSTAL1,CRYSTAL3,crystal3
MaxDebris=4
MinDebris=2
PixelSelectionBracketDelta=-8 ;es para la altura de la barra de vida
Sensors=yes
SensorsSight=2


Through a quick look i would say the ore is generated where DebrisAnims= tag is. CRYSTAL1 is green tiberium. CRYSTAL3 is blue tiberium.
if i try to apply this code to my War Miner it doenst work, it does the same thing by painting one tile with invisible ore. Does anyone have any suggestions? should i paste in the CRYSTAL1 and 3 code?

On a side note.. this is driving me crazy. Also im trying to get LAN networking working (<HA) and its a pain Sad but this is offtopic, i cant expect anyone answering this.

_________________
--
To have faith in others, is first to have faith in yourself

Back to top
View user's profile Send private message Skype Account
Ickus
General


Joined: 25 Nov 2002
Location: @__@

PostPosted: Mon Jan 21, 2008 7:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

you have to look in the Artmd.ini. also CRYSTAL animations need to be defined, The image is there it just those animation are not coded in. Wink

_________________
Delirium..

Back to top
View user's profile Send private message
fx3_hdrive
Vehicle Drone


Joined: 19 Jan 2008
Location: UK

PostPosted: Mon Jan 21, 2008 8:47 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yes i did code them in. ive coded CRYSTAL1 and CRYSTAL3, Copied it from the mod but changed a few things like the warhead to TankOGas (it was set to NEWTankOGas i presumed that the guy who made the mod changed the warhead as well, do you think that could generate the ore?) OK, here goes the code for the crystals:
Code:

[CRYSTAL1]
Elasticity=0.0
MinZVel=35.0;40.0
MaxXYVel=18.0
ExpireAnim=TIBTWLT026;TWLT026
Damage=45
DamageRadius=100
Warhead=TankOGas
IsTiberium=true
LoopStart=0
LoopEnd=14
LoopCount=-1
Rate=500
;DetailLevel=0
RandomRate=220,500
Bouncer=yes
Theater=yes
TiberiumSpreadRadius=1
TiberiumSpawnType=TIB01;TIB2_01
RadLevel=400

[CRYSTAL3]
Elasticity=0.0
MinZVel=35.0;40.0
MaxXYVel=18.0
ExpireAnim=TIBTWLT026;TWLT026
Damage=55
DamageRadius=100
Warhead=TankOGas
IsTiberium=true
LoopStart=0
LoopEnd=14
LoopCount=-1
Rate=500
;DetailLevel=0
RandomRate=220,500
Bouncer=yes
Theater=yes
TiberiumSpreadRadius=1
TiberiumSpawnType=GEM01;TIB2_01


What do you think?

_________________
--
To have faith in others, is first to have faith in yourself

Back to top
View user's profile Send private message Skype Account
fx3_hdrive
Vehicle Drone


Joined: 19 Jan 2008
Location: UK

PostPosted: Mon Jan 21, 2008 9:41 pm    Post subject: Reply with quote  Mark this post and the followings unread

Ok Ok i've just tried it again and i realized that the mod doesn't apply to saved maps, so i didn't realized this until now, so all my experimentation wasn't working Sad

BUT !!

I have modified it quickly and now i have this code for the [CRYSTAL1]

Code:
[CRYSTAL1]
Name=TiberiumCrystal02
Image=GASTANK
Elasticity=0.0
MinZVel=35.0;40.0
MaxXYVel=18.0
ExpireAnim=TWLT026
Damage=45
DamageRadius=100
Warhead=TankOGas
IsTiberium=true
LoopStart=0
LoopEnd=14
LoopCount=-1
Rate=500
Duration=150
;DetailLevel=0
RandomRate=220,500
Bouncer=yes
Theater=yes
TiberiumSpreadRadius=1
TiberiumSpawnType=TIB01;TIB2_01
RadLevel=400


What this code above does is launch about 3-4 shards up high in the sky but then they crash down with no ore Sad where am i going wrong?

_________________
--
To have faith in others, is first to have faith in yourself

Back to top
View user's profile Send private message Skype Account
fx3_hdrive
Vehicle Drone


Joined: 19 Jan 2008
Location: UK

PostPosted: Mon Jan 21, 2008 10:11 pm    Post subject: Reply with quote  Mark this post and the followings unread

This is so weird, i just found out that it does indeed produce one square of ore, but then that ore starts to grow from that patch, im really confused now! i knew that ore production was confusing already but this is a whole new level !

Maybe im creating a tiberuim tree (drill) instead of just ore? that would explain the one square thing?

_________________
--
To have faith in others, is first to have faith in yourself

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


Joined: 01 Feb 2007
Location: Las Vegas, Nevada, USA

PostPosted: Mon Jan 21, 2008 10:17 pm    Post subject: Reply with quote  Mark this post and the followings unread

spreadradius=0?

Back to top
View user's profile Send private message Send e-mail Visit poster's website
fx3_hdrive
Vehicle Drone


Joined: 19 Jan 2008
Location: UK

PostPosted: Tue Jan 22, 2008 12:47 am    Post subject: Reply with quote  Mark this post and the followings unread

aha, that makes sense.

but what about it being only 1 square of ore? its a very small amount of money. and in Reloaded it drops about 3-4 pieces, and each spawn little 2-3 tile ore patches

_________________
--
To have faith in others, is first to have faith in yourself

Back to top
View user's profile Send private message Skype Account
Dutchygamer
President


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Tue Jan 22, 2008 10:03 am    Post subject: Reply with quote  Mark this post and the followings unread

That can't be changed. There may be a large patch of ore sometimes, but the chance of that happening is very small...

Back to top
View user's profile Send private message Send e-mail Skype Account
fx3_hdrive
Vehicle Drone


Joined: 19 Jan 2008
Location: UK

PostPosted: Tue Jan 22, 2008 12:21 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hmm, yea i was thinking about that on my way to uni. but then it came to me, debris can spawn more debris (like a large piece hitting the ground and spawing 3 little pieces) so what i will do is have 3-4 pieces fly off when the unit is destroyed, then when thouse pieces fall to the ground 5 more pieces of debris fly off (this time IsTiberium=true) thus i will get 5x3 squares of ore, that i think should be enough, although, do you think this will slow down the game? i hear messing with ore adds massive lag to network games...

Thanks for the help so far, i should have this sorted in no time !

_________________
--
To have faith in others, is first to have faith in yourself

Back to top
View user's profile Send private message Skype Account
fx3_hdrive
Vehicle Drone


Joined: 19 Jan 2008
Location: UK

PostPosted: Tue Jan 22, 2008 10:59 pm    Post subject: Reply with quote  Mark this post and the followings unread

Ok ive testes almost every combination of everything, Meteor logic isnt supported, so its not as easy as TS.

Suprisingly enough this code somehow works, just need to be tweaked for the desired effect.

Basically what i did is hook up three tags to TIRE debris:
Code:
IsTiberium=true
TiberiumSpawnType=TIB01
TiberiumRadius=1


I know TiberiumRadius= makes it grow, so im going to take it off in a minute.
So i can confirm that ore tiles appear, but i need to increase quantity so they are worth real money.

Ok im going back to hacking, and will report soon..

_________________
--
To have faith in others, is first to have faith in yourself

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


Joined: 01 Feb 2007
Location: Las Vegas, Nevada, USA

PostPosted: Tue Jan 22, 2008 11:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

can you increase the value of the ore? so..... why not just have the tire worth 100? its pretty much logical anyways.

Back to top
View user's profile Send private message Send e-mail Visit poster's website
fx3_hdrive
Vehicle Drone


Joined: 19 Jan 2008
Location: UK

PostPosted: Wed Jan 23, 2008 12:07 am    Post subject: Reply with quote  Mark this post and the followings unread

where is this "worth" tag you are talking about?
If there is a value tag for ore then i wish to find out.

So after some more xtensive testing ive came to a same conclusion that DragonFly came to some time ago = I could spawn ore, but just one square or lowest value ore (meaning that the ore in a tile is so sparse that you need a whole field to fill a miner).

If anyone has any suggestions, please come forward !

_________________
--
To have faith in others, is first to have faith in yourself

Back to top
View user's profile Send private message Skype Account
fx3_hdrive
Vehicle Drone


Joined: 19 Jan 2008
Location: UK

PostPosted: Wed Jan 23, 2008 12:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

is it possible to spawn an ore drill (an invisible one) upon destruction of every unit, and have that make some ore quickly and then disappear? If you cant make dense ore tiles, the only way to make them is to grow them with a drill right?

_________________
--
To have faith in others, is first to have faith in yourself

Back to top
View user's profile Send private message Skype Account
Allied General
General


Joined: 19 Mar 2004
Location: United Kingdom

PostPosted: Wed Jan 23, 2008 12:43 pm    Post subject: Reply with quote  Mark this post and the followings unread

Last time I checked, ore generated by shp anims didn't grow or whatever (or at least caused major lag after a while) but your actual ore growth problem relates to time and some tags which need changing

http://forums.revora.net/index.php?showtopic=38062

provided by Apollo, who used it for his mod Robot Storm

so as long as your debris was the exploding vehicle parts or whatever it would work

_________________

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID Facebook Profile URL Twitter Channel URL
wardeathfun
Commander


Joined: 01 Feb 2007
Location: Las Vegas, Nevada, USA

PostPosted: Wed Jan 23, 2008 7:48 pm    Post subject: Reply with quote  Mark this post and the followings unread

; This is Ore
[Riparius]
Name=Tiberium Riparius
Image=1
Power=0
Value=25
Growth=2200
GrowthPercentage=.06
Spread=2200
SpreadPercentage=.06
Color=NeonGreen ; **WARNING**: If you change this color, notify Bret_a

copied and pasted. im assuming yo made the tire the same..... but reading it sounds like you made a TIBTRE instead.... which is pretty much a drill.... im unsure if i am helpful at this point. im leaving this topic. lol.

Back to top
View user's profile Send private message Send e-mail Visit poster's website
fx3_hdrive
Vehicle Drone


Joined: 19 Jan 2008
Location: UK

PostPosted: Thu Jan 24, 2008 6:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

OK wow this is amazing, Ive done exactly like the guy in the post did (but hooked the debris to the a tank. whenever a tank explodes theres a mighty pile of ore right where it blew ! this is exacly how i wanted it this is great.

BUT .....

This creates another issue, because i have edited the global ore values now every ore field behaves weirdly, every time the drill turns a full patch of ore appears, as opposed to a small patch appearing.

so this leads me onto another question:
Is it now possible to spawn a different overlay item with ore-like properties, say using one of the other unused ores? that way global ore remains unaffected and i can change the look of the ore that i spawn.

And ideas?
(i can feel a mod coming here)

_________________
--
To have faith in others, is first to have faith in yourself

Back to top
View user's profile Send private message Skype Account
Dutchygamer
President


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Thu Jan 24, 2008 6:25 pm    Post subject: Reply with quote  Mark this post and the followings unread

Too bad you can only spawn the first Tiberium/Ore type in the list, so your idea will not succeed I'm afraid...

Back to top
View user's profile Send private message Send e-mail Skype Account
fx3_hdrive
Vehicle Drone


Joined: 19 Jan 2008
Location: UK

PostPosted: Thu Jan 24, 2008 6:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

What about something like a crate type thing? or any other collectable item?
so that means i cant spawn gems? with GEM01 ??

_________________
--
To have faith in others, is first to have faith in yourself

Back to top
View user's profile Send private message Skype Account
Ickus
General


Joined: 25 Nov 2002
Location: @__@

PostPosted: Fri Jan 25, 2008 12:15 am    Post subject: Reply with quote  Mark this post and the followings unread

try it. you can spawn up to 1-12..IIRC.

in TS there were more entries that depicted sloped tiberium. in RA2 it doesnt have these variants for ore.

_________________
Delirium..

Back to top
View user's profile Send private message
fx3_hdrive
Vehicle Drone


Joined: 19 Jan 2008
Location: UK

PostPosted: Fri Jan 25, 2008 12:47 am    Post subject: Reply with quote  Mark this post and the followings unread

Exploding units drop ore final solution:

Ok ive tinkered about with this for long enough to post a solution:

first of all, ive used the well knows solution of spawning ore with debris
but then debris would only spawn one small tile, its not enough money there.
So by increasing ore growth rate (! not spread rate, growth rate relates to how fast can a single tile of small ore grow into a tile full of ore). This didn't affect normal ore fields adversely (perhaps making the ore grow abit faster, but this can be compensated by reducing the ore spread rate or something, basically make the ore grow faster, but make tiles appear less often)

A single tile of ore is worth 275 credits so you can control how much ore is spawn by how many pieces you release.

Unit code:
Code:
MaxDebris=6 ; maximim pieces of ore worth about 1400
MinDebris=4 ; minimum pieces, its a miner afterall
DebrisType=ORE ; type of debris, ORE is a voxel
DebrisMaximums=6 ; just to be sure


Debris code in RulesMD.ini
Code:
[ORE]
;Name=TiberiumShard
Name=Ore Chunk
Image=ORE ; this is a voxel i quicky knocked up
Elasticity=0.0
MinAngularVelocity=12.0
MaxAngularVelocity=24.0
MinZVel=40.0
MaxZVel=35.0
MaxXYVel=18.0
Duration=150
ExpireAnim=TWLT036
Damage=0
DamageRadius=0
Warhead=TankOGas
IsTiberium=true
TiberiumRadius=1 ; how many tiles to spawn, very unpredictable
TiberiumSpawnType=TIB07


Ore changes:
Code:
; This is Ore
[Riparius]
Name=Tiberium Riparius
Image=1
Power=0
Value=25
Growth=500 ; changed this, used to be 2200
GrowthPercentage=.06
Spread=2200
SpreadPercentage=.06
Color=NeonGreen


Ok so if everyone has no questions, complaints, or improvements this thread could use a lock since its a happy ending. Contact me if you have any questions.

Oh yea, and big massive kudos to Allied general, since the solution he found was just what i needed, thanks !

_________________
--
To have faith in others, is first to have faith in yourself

Back to top
View user's profile Send private message Skype Account
gordon-creAtive
Cyborg Soldier


Joined: 14 Jun 2007

PostPosted: Sat Jan 26, 2008 10:06 am    Post subject: Reply with quote  Mark this post and the followings unread


_________________
Teammember of the German Gamers Association
VDVC

Back to top
View user's profile Send private message
fx3_hdrive
Vehicle Drone


Joined: 19 Jan 2008
Location: UK

PostPosted: Sat Jan 26, 2008 5:25 pm    Post subject: Reply with quote  Mark this post and the followings unread


_________________
--
To have faith in others, is first to have faith in yourself

Back to top
View user's profile Send private message Skype Account
Nerd
Medic


Joined: 17 Oct 2007

PostPosted: Sat Jan 26, 2008 5:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

ztype ORE

Back to top
View user's profile Send private message
4StarGeneral
General


Joined: 14 Sep 2006
Location: Limbo

PostPosted: Sat Jan 26, 2008 6:09 pm    Post subject: Reply with quote  Mark this post and the followings unread

Very nice tutorial!

_________________
"Don't beg for things; Do it yourself or you'll never get anything."

Back to top
View user's profile Send private message Send e-mail YouTube User URL
Dutchygamer
President


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Sat Jan 26, 2008 6:14 pm    Post subject: Reply with quote  Mark this post and the followings unread

Ehmm, is it just me, or must the tutorial still be put on ModEnc. With me, it only gives a page with the title of the tutorial, but nothing else...

Back to top
View user's profile Send private message Send e-mail Skype Account
fx3_hdrive
Vehicle Drone


Joined: 19 Jan 2008
Location: UK

PostPosted: Sat Jan 26, 2008 6:19 pm    Post subject: Reply with quote  Mark this post and the followings unread

Dutchygamer, i can post it here if you cant view it?

_________________
--
To have faith in others, is first to have faith in yourself

Back to top
View user's profile Send private message Skype Account
Dutchygamer
President


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Sat Jan 26, 2008 6:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

You don't need to post it here specially for me, but it could be handy for other members. Wink

Back to top
View user's profile Send private message Send e-mail Skype Account
fx3_hdrive
Vehicle Drone


Joined: 19 Jan 2008
Location: UK

PostPosted: Sat Jan 26, 2008 6:34 pm    Post subject: Reply with quote  Mark this post and the followings unread

Alas it will be done.

You can find the original tutorial here http://modenc.renegadeprojects.com/Ore_spawning (unless your name is Dutchygamer haaa)

Spawning ore with debris

This tutorial will explain how to create patches (or tiles) of ore from flying debris. This can be used for many other purposes such as when hooked to a weapon it becomes an ore spawning weapon, Shoot a tile, and ore appears, and such.
This works on Red Alert 2 Yuri's Revenge 1.001 without rockpatch or npatch

Intro
There are 3 main elements to controlling ore:

* Generation of debris
* Debris piece that becomes ore
* Global ore properties

Generation of debris
Very easy to achieve with a DebrisTypes= tag, in practice harder to get working reliably, so start by picking a "guinea pig" unit which we will do all experiments on. I chose the Rhino Tank since you start with 4 of them in multiplayer.
In its properties add these tags as a test: ( Note: beware that there is a mistake in the original code, "Maxdebris=" should be "MaxDebris=" )

Code:
MaxDebris=6
MinDebris=4
DebrisTypes=TIRE
DebrisMaximums=6 ;Later on this one, i promise


The tags are self explanatory. Test the changes by blowing up a Rhino Tank in game, you should see 4 to 6 tires flying off the tank after it explodes, if it doesnt, you messed up.

Debris piece that becomes an ore tile
Now that we know the debris generation works, we shall play with TIRE voxel debris code now. Using TIRE again as our guniea pig.
at the bottom of the code add these tags:

Code:
IsTiberium=true
TiberiumRadius=1 ;how many tiles of ore we want around our impact
TiberiumSpawnType=TIB07 ;type of ore to spawn 1-12 works. gems are GEM01 - 12 i think.


Now if you test this in game you will see something very strange. If you check carefully you will realise that ore in fact is spawned by the TIRE debris, yet in such small amounts that its very hard to see. If this is the case next section should sort it.

Global Ore Properties
Be aware that we are changing the global ore properties, this means that it will affect not only the ore that we spawn, but also the ore that is grown naturally by ore drills. The effect is small but significant enough to look out for.
The problem with out new spawned ore patches is that they dont grow (by grow i mean the ore in the tile stays the same density, this has nothing to do with amount of ore produced by the ore drills).

In the ore properties we have 4 entries, all are different forms of ore (Tiberium, remnants from Tiberium Sun game)

[Cruentus] are gems
[Riparius] is ore

In [Riparious] section change this tag:

Code:
Growth=500 ;original value is 2200


Results
Start the game and blow up your tank. If you done everything correctly the tank should blow into several tires, those, when stop bouncing should create single full patches of ore worth 275 credits.

Cleaning Up
Now suppose you would like to hook this to every unit that is destroyed in game? its a bit rubbish leaving it as a tire. So... lets change it ! This means we need to do these things:

* Create a special ORE debris type
* Hook the ORE debris to units
* Create a voxel for the ORE
* Tweek parameters and looks
* Control the amount of ore expelled

Creating a new ORE debris type
Copy the code as it is from TIRE entry (same code that currently generates ore). Call it [ORE] leave everything as it is for now, we would like to test this first Remove 3 lines from [TIRE] that we added previously
[edit] Hooking the ORE debris to units

In our Rhino Tank change this line to:

Code:
DebrisTypes=ORE ; Was set to TIRE


And now test to see if it works exactly as it was before. If it doesn't, recheck everything.

Creating a Voxel for ORE
Create a ore looking piece (mine was 10x10x10 in size, looked alright) and name it ORE.vxl Put this file in the game folder and change the ORE entry like this:

Code:
Image=ORE ; was set to TIRE


Test the game once more.

Tweek parameters and looks of ORE debris
Now you know that everything works you can change how far the ore is flying out and where it lands, I made it land just short of where tires could go, i also changed Elasticity= tag to stop the ore from bouncing.

Warhead= tag isn't necessary

Control amount of ORE expelled
Tanks explode in ore, OK, but is that fair? now you can build tanks => kill them => mine the ore for profit? thats not fair at all now is it. So lets limit the amount of debris that is spawned by units.

Now you need to one rule about the DebrisMaximums= tag:

DebrisMaximums= must not be larger than MaxDebris= tag. Sounds stupid, its actually quite clever, for example:
Our Rhino tank is worth 900 credits, so about 3 ore pieces should cover it. i also want some tires to be expelled, but they shouldn't contain any ore
Code:
MaxDebris=5 ;total number of debris
MinDerbis=3 ;minumum number of debris
DebrisTypes=ORE,TIRE ;types of debris
DebrisMaximums=3,2 ;maximum nummber for each type


This way, when the tank blows up, you should get at combination of ore and tires, no more than 3 ore pieces, no less than 1 ore piece. sounds fair that.

You will have to go through every unit and change these tags to suit the unit cost, you might not want to add 2 debris types at all.

_________________
--
To have faith in others, is first to have faith in yourself

Last edited by fx3_hdrive on Sat Jan 26, 2008 6:37 pm; edited 1 time in total

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


Joined: 01 Aug 2003
Location: Galt's Gulch

PostPosted: Sat Jan 26, 2008 6:36 pm    Post subject: Reply with quote  Mark this post and the followings unread

fx3, thank you for posting it at ModEnc, but in the future, please refrain from submitting so many revisions, there's a Preview button.

Back to top
View user's profile Send private message Visit poster's website Skype Account
fx3_hdrive
Vehicle Drone


Joined: 19 Jan 2008
Location: UK

PostPosted: Sat Jan 26, 2008 6:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

Oh dear, i do apologize DCoder, its first time i used a wiki, will remember that in the future.

_________________
--
To have faith in others, is first to have faith in yourself

Back to top
View user's profile Send private message Skype Account
Dutchygamer
President


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Sat Jan 26, 2008 6:44 pm    Post subject: Reply with quote  Mark this post and the followings unread

fx3_hdrive wrote:
You can find the original tutorial here http://modenc.renegadeprojects.com/Ore_spawning (unless your name is Dutchygamer haaa)

Dude, thats not funny Confused
Anyways, good tutorial. You may post the tutorial in PPM's RA2 Tutorial section too, you know Wink

Back to top
View user's profile Send private message Send e-mail Skype Account
fx3_hdrive
Vehicle Drone


Joined: 19 Jan 2008
Location: UK

PostPosted: Sat Jan 26, 2008 7:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

im not sure how to do that, and Ive got my "mod" to finish up, but if you want to do it, by all means.

_________________
--
To have faith in others, is first to have faith in yourself

Back to top
View user's profile Send private message Skype Account
fx3_hdrive
Vehicle Drone


Joined: 19 Jan 2008
Location: UK

PostPosted: Sun Jan 27, 2008 1:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

OOOOOOOhhhhhhhhhhhhhhhhh ive just discovered something !!!! its like so awesome !

If you remember from my tutorial, ive hooked up a warhead with damage to my ore debris. And ive discovered that if you fire upon the ore, it will diminish in density.
This means that you can control how much ore you release from the unit by giving the ore some damage properties so as soon as it hits the ground and creates a full tile, the damage ill regress the tile so the ore is sparse.

This isnt very significant, but im trying to gather as much info as possible on this in one place.

_________________
--
To have faith in others, is first to have faith in yourself

Back to top
View user's profile Send private message Skype Account
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [45 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.2183s ][ Queries: 15 (0.0140s) ][ Debug on ]