logo   login
right
Home Forums Downloads Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Forum Info
Forum Members: 18,677
Total Threads: 8,796
Posts: 95,827

Administrators:
DeeZire, Redemption

There are currently 53 users online.
Partner Links

Free Credit Repair

Learn the Ticket Broker Secrets
Advertisements


Generals & Zero Hour Editing Discuss any modding related issues to do with Generals and Zero Hour here.

Reply
 
LinkBack Thread Tools
Old 01-12-2004, 10:29 AM   #1 (permalink)
Senior Member
 
Join Date: Aug 2003
Location: UK
Posts: 704
Send a message via MSN to Mithril
Default Multiple Overlord OCL bypass solution

It is generally possible, in theory, to create a unit with an infinite number of added objects, by the use of the slaved update logic from the stinger site.

The soldiers in the stinger sites are added via spawn points, (which are bones defined in the model).

With a spawn behavior, I believe it is possible to add an unlimited number of subobject to a mainobject.

The only bit that I am worrying about is motion. The stinger site was never intended to move, as far as I know, therefore the spawn behavior would not support it, the added objects would stay in the original place when the main object moves.

There is a solution to that too, though.

If the spawn replace delay in the spawn behavior is set to 0, and a fireweaponupdate is used to destroy the subobjects every 200 miliseconds or so, it would be possible to simulate the motion of subobjects.

To clarify, here is a code example.

Lets say we want a tank with 12 weapons.

All you have to add to the factionunit (lets take the crusader tank) is this:

Body = HiveStructureBody ModuleTag_04 ;Requires SpawnBehavior!
MaxHealth = 1000.0
InitialHealth = 1000.0
;**Careful with these damage types -- because area damage types will already
;**damage slaves.
PropagateDamageTypesToSlavesWhenExisting = NONE +SMALL_ARMS +SNIPER +FLESHY_SNIPER +POISON +RADIATION
SwallowDamageTypesIfSlavesNotExisting = NONE +SNIPER +FLESHY_SNIPER ; Take no damage if noone to pass this to
End

Behavior = SpawnPointProductionExitUpdate ModuleTag_05
SpawnPointBoneName = SpawnPoint
End

Behavior = SpawnBehavior ModuleTag_06
SpawnNumber = 4
SpawnReplaceDelay = 0 ;msec
SpawnTemplateName = CrusaderAddon1
SpawnTemplateName = CrusaderAddon2
SpawnTemplateName = CrusaderAddon3
SpawnTemplateName = CrusaderAddon4
CanReclaimOrphans = No
SpawnedRequireSpawner = Yes
End




In order to make 12 weapons for a tank, you will need four added objects, since each added object can take three weapons, PRIMARY SECONDARY and TERTIARY

Bones called SpawnPointxx (where xx should be a number) must be
added to the main object, in this case, we have to add 4 spawn points to our crusader tank.


Object CrusaderAddon1

; *** ART Parameters ***
SelectPortrait = SNGatTower_L
ButtonImage = SNGatTower

;UpgradeCameo1 = Upgrade_Nationalism
;UpgradeCameo4 = NONE


Draw = W3DModelDraw ModuleTag_01
OkToChangeModelColor = Yes
DefaultConditionState
Model = ;;any model here
Turret = TURRET
TurretPitch = TURRETEL
WeaponLaunchBone = PRIMARY WeaponA
WeaponLaunchBone = SECONDARY WeaponB
WeaponLaunchBone = SECONDARY WeaponC
End


End

; ***DESIGN parameters ***
Side = America
EditorSorting = SYSTEM
TransportSlotCount = 1
WeaponSet
Conditions = None
Weapon = PRIMARY CrusaderGunOne
Weapon = SECONDARY CrusaderGunTwo
Weapon = TERTIARY CrusaderGunThree
End

ArmorSet
Conditions = None
Armor = AddonArmor
End
VisionRange = 200

; *** AUDIO Parameters ***
UnitSpecificSounds
TurretMoveStart = NoSound
TurretMoveLoop = NoSound ;TurretMoveLoop
VoiceRapidFire = NoSound
End

; *** ENGINEERING Parameters ***
KindOf = PRELOAD VEHICLE CAN_ATTACK CLICK_THROUGH IGNORED_IN_GUI
Body = StructureBody ModuleTag_02
MaxHealth = 100.0
InitialHealth = 100.0
End

Behavior = AIUpdateInterface ModuleTag_03
Turret
ControlledWeaponSlots = PRIMARY SECONDARY TERTIARY
TurretTurnRate = 0 // turn rate, in degrees per sec
TurretPitchRate = 0
AllowsPitch = No
End
AutoAcquireEnemiesWhenIdle = Yes
End

Behavior = DestroyDie ModuleTag_04
;nothing
End



Geometry = BOX
GeometryMajorRadius = 8.0
GeometryMinorRadius = 8.0
GeometryHeight = 9.0
GeometryIsSmall = No
Shadow = SHADOW_VOLUME
ShadowSizeX = 45 ; minimum elevation angle above horizon. Used to limit shadow length
End


( I have only made one CrusaderAddon object in order to avoid huge code)

To simulate motion, you will need a special weapon with a special damage type.
DEPLOY is a damage type that has no use, so we shall use this damage type to destroy our addon object every two hundred miliseconds or so

This would be the entry for the AddonArmor:

Armor AddonArmor
Armor = DEFAULT 0%
Armor = DEPLOY 100%
End


NOTE: All other armors must have DEPLOY = 0% in order to avoid objects
being destroyed from our AddonDestructor


This would be our addon destroyer:

Weapon AddonDestroyer
PrimaryDamage = 1000.0
PrimaryDamageRadius = 10.0
SecondaryDamage = 0.0
SecondaryDamageRadius = 0.0
ScatterRadiusVsInfantry = 0.0 ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
AttackRange = 10.0
MinimumAttackRange = 0.0
DamageType = DEPLOY
DeathType = EXPLODED
FireFX = FX_TomahawkIgnition
ProjectileObject = PatriotMissileInvisible
ProjectileExhaust = TomahawkMissileExhaust
VeterancyProjectileExhaust = HEROIC HeroicTomahawkMissileExhaust
; ProjectileDetonationFX = WeaponFX_TomahawkMissileDetonation
ProjectileDetonationFX = WeaponFX_BombTruckDefaultBombDetonation
RadiusDamageAffects = SELF ALLIES ENEMIES NEUTRALS NOT_SIMILAR
FireSound = TomahawkWeapon
ShotsPerBarrel = 1
DelayBetweenShots = 1
ClipSize = 2
ClipReloadTime = 7000
AntiAirborneVehicle = Yes
AntiAirborneInfantry = Yes
AntiGround = No
AntiBallisticMissile = No
CapableOfFollowingWaypoints = Yes

ProjectileCollidesWith = STRUCTURES
End


NOTE: There might be useless code in this entry

NOTE: The projectile would have to be invisible




Thats it.

I hope this works, I've tried similar things and they worked, but I haven't got the time to experiment with this logic yet.


This would make it possible to have directional armor and "ships with a gazillion weapons"....
Mithril is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-12-2004, 10:48 AM   #2 (permalink)
Senior Member
 
Join Date: May 2003
Location: Eindhoven, Netherlands
Posts: 2,278
Send a message via ICQ to CodeCat Send a message via MSN to CodeCat
Default

Very nice work, looks good! But one problem though... DEPLOY is used by the Troop Crawler, you missed that. If you start messing with it, you can't use the TC to attack and deploy troops. Not that anyone uses that anyway, but be aware of that. Alternatively you can just remove the deploy weapon alltogether. But because DEPLOY has special code attached to it (which is what gets the TC to deploy when you fire it) I don't know if it will cause any conflicts or problems with your addons.

But nice work though.
CodeCat is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-12-2004, 11:59 AM   #3 (permalink)
Senior Member
 
Join Date: Feb 2003
Location: USA
Posts: 853
Send a message via AIM to mastermind2003 Send a message via MSN to mastermind2003
Default

The movement shouldn't be a problem, since the bones are attached to the object. Vanguard did something like this, but with the firebase logic, to get infantry to be visible on vehicles. I like this idea.
mastermind2003 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-12-2004, 01:31 PM   #4 (permalink)
Junior Member
 
Join Date: Nov 2003
Posts: 13
Send a message via MSN to Chronologic
Default

I'm quite sure that spawns move properly with the object, I borrowed code from the Stinger site so that I could have Overlords being built with infantry supporting them as extra armour, in a sense. 'Twas a fun day then.
Chronologic is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-12-2004, 03:03 PM   #5 (permalink)
Senior Member
 
Join Date: Aug 2003
Location: UK
Posts: 704
Send a message via MSN to Mithril
Default

Its good to know that movement works with spawned objects.


Thanks for the insight, ImmoMan, I've got to change that in my mod!

By the way, I will take this opportunity to thank you for that brilliant moduleguide you have done, it has helped me dozens of times now and I'm sure it wasn't easy work!



Directional armor should also be possible now, since the spawn logic supports movement, I hope this will come in useful sometime.


If anyone is interested, I've also found a possibility to make navalyards buildable only on water, but it seems like no one makes a mod with ships anymore..

Anyway, thanks for the answers,

mithril
Mithril is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-12-2004, 03:10 PM   #6 (permalink)
Senior Member
 
Join Date: Jun 2003
Location: Texas
Posts: 709
Send a message via ICQ to Vanguard Send a message via AIM to Vanguard Send a message via MSN to Vanguard Send a message via Yahoo to Vanguard
Default

I have many ideas that worked theoretically, but then when I tried they didn't, show me proof that it works, then I will congradulate you.
Vanguard is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-12-2004, 03:38 PM   #7 (permalink)
Senior Member
 
Join Date: May 2003
Location: Eindhoven, Netherlands
Posts: 2,278
Send a message via ICQ to CodeCat Send a message via MSN to CodeCat
Default

Quote:
Originally Posted by Mithril
By the way, I will take this opportunity to thank you for that brilliant moduleguide you have done, it has helped me dozens of times now and I'm sure it wasn't easy work!
Thanks!

It wasn't really easy but most of it was just getting stuck in and doing it. It was not the difficulty as much as the sheer amount of work (of course typing it all) that made it hard. Most of the time I just READ what it said. You can extract the meaning a of large part of the stuff in the INIs just by reading the names of things. And the rest of it was just seeing what a particular thing could mean in the given context. Of course, being a (personal) modder since Red Alert does help to understand the structure of the game quite a bit. But Generals has a lot of new stuff so not everything is easier to learn with the proper knowledge of earlier games. And the guide is by no means complete (just look at the Todo list ). But thanks for the comment, I appreciate it.

Any room for improvement BTW?
CodeCat is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-12-2004, 05:17 PM   #8 (permalink)
Senior Member
 
Join Date: Aug 2003
Location: UK
Posts: 704
Send a message via MSN to Mithril
Default

Hmm.. improvement..


Perhaps making a direct copy&paste of all modules in another submenu would be good, since it would allow users to directly copy and paste the modules without the comments.

But other than that, I can't find anything to (constructively) criticise.


Have you asked deezire about the programmers docs? He mentioned it in some post, but said it was too much work to post or something like that, but it might be a very valuable addition to the deezire editing encyclopedia (which, I must say, without offending, is astonishingly tiny).


I only started modding with generals, I focused on c++ before that, but then I got into this modding loop with an inifinite todo list, and I have to focus on modding now, which is also quite similar to programming.


By the way, vanguard, have you received my private message about navalyards?

I'll tell "the trick" to anyone if I am only asked, but if no one is actually making a mod with loads of ships in it, then I don' t need to tell it.


Ah and ImmoMan, what I really would be interested in would be a description of the CommandButtonHuntUpdate and EnemyNearUpdate, I will make a few experiments when I get time, and relay the results..
Mithril is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-12-2004, 09:18 PM   #9 (permalink)
Administrator
 
DeeZire's Avatar
 
Join Date: Dec 2002
Posts: 1,913
Send a message via ICQ to DeeZire
Default

Tiny?! The Red Alert 2 INI Guide contains over 2 million characters of information that was gathered without any support from Westwood over a period of more than 2 years

The CommandButtonHuntUpdate module needs no parameters, although its best used only on objects that have some auxilliary function (like Remote Demo Charges etc). It allows the object to be used to 'hunt' using that command button ability via scripts.

The EnemyNearUpdate has no parameters either, it allows for the ConditionState of ENEMYNEAR on the object so that its appearance can differ when it is spotted by an enemy object.
DeeZire is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-12-2004, 10:04 PM   #10 (permalink)
Senior Member
 
Join Date: Aug 2003
Posts: 1,087
Default

thanks for pointing this out
key0p is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Overlord Void Generals & Zero Hour Editing 12 11-28-2006 04:58 PM
I forget the solution... Hostile LOTR: Battle For Middle Earth I & II Editing 2 05-16-2005 08:22 AM
The Capellan Solution : Recruiting LynX2oo3 Generals & Zero Hour Editing 21 10-28-2004 04:54 PM
Temporary navalyard solution Mithril Generals & Zero Hour Editing 0 11-11-2003 08:15 AM
Reenabling the cut 'GENERAL' logic. Possible solution. pascal314 Generals & Zero Hour Editing 16 03-13-2003 09:09 PM


All times are GMT -4. The time now is 10:27 PM.


Design By: Miner Skinz.com
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.