IPB

Welcome Guest ( Log In | Register )


 
Reply to this topicStart new topic
> (****) Naval Yard/Alt war factory V 2.0, Without using mobile buildings
Machine
post Jul 1 2007, 07:40 PM
Post #1


Attack Buggy
Group Icon

Group: Members
Posts: 228
Joined: 22-January 07
From: Chile
Member No.: 687
Alliance: GDI
Favorite game: Tiberian Sun



I suggest you to read Morpher's Naval Yard/Alt war factory, if you can understand it properly, and apply it to your mod you should be able to understand this, as it's heavily based on it. With this you can replicate an almost exact copy of RA shipyards, though it's more close to RA2 shipyards lol.gif

Knowledge/Abilities required:
-Full understanding of Morpher's tutorial.
-Create new sides.
-AI editing (very little)
-Common rules.ini modding

Notes:
-It will work fine if captured.
-It doesn't need to be deployed from a vehicle, you can build it from the Conyard.
-It won't cause problems if it's not the primary building, in fact it doesn't matter if you set the naval yard or the war factory as primary, vehicles will be built from the appropriate building.
-You can set some vehicles to be built from both factories (RO's using that for GDI hovers).
-It has the same limitations than Morpher's method; the AI won't use it properly, and you won't be able to build a unit from each warfactory at the same time.
-It will make you reach the 100 units limit faster.
-It works with any type of factory.

-This was the real reason to include a navy in RO, as I wanted to utilize this logic.
-This was originally RO exclusive coding feature, however I decided than that was being mean with the community, as all mods should post their discoveries
-Screenshots of this will appear soon in RO forums; I'll fix the link when ready.
-Only few people knew this logic, since I told them lol.gif, RO modding team, and Morpher, maybe some other TO members, as he might have included/discussed this logic.


Introduction to Morpher's method:
Well, we have all noticed that if we capture an opposite side's factory, we'll be able to build their units, and those units will only come from their respective factory.
So a side's factory just builds their own side units. As Morpher said, if we make a factory with owner=Neutral, only units that belong to the Neutral house will be built from there (with owner=Neutral).
The problem to exploit this was how could you build another side's factory, if this already limited you (your conyard has it's ownership tagged to the side you chose when you start the game, so you can't build enemy buildings, even if they have the same prerequisite, since they have owner=the other side. Also this seems to apply only to conyards, as factories keep dual ownership if built by some side).
Morphers solution was to abuse deploying code, which allowed units from an specific side to deploy into buildings from other side. With this, he created 1 virtual (dummy) side for each side, a set of units and a factory that were owned by one of those sides.
However it had a big problem, the building couldn't be placed from the conyard, losing the RA feeling to it.

Machine's Extended Method:
To have that RA feel it would be necessary to have naval yards built from the conyard; this was thought to be impossible, however I found a workaround (not really, it was more like theorical illumination lol.gif)
All I had to do was to find a way to build a building from another side. The answer was really easy, just had to set owner tag to a dual owner.
Owner=GDINAVAL,GDI

CODE
Example coding from RO:
; GDI Ship Yard
[GAWEAP2]
Name=Ship Yard
WeaponsFactory=yes
Factory=UnitType
WaterBound=yes; just if you want it as a shipyard
AIBuildThis=no
Owner=GDINAVAL,GDI


In this way I could build the naval yard from the conyard, however a problem appeared, ground units could be built from the naval yard. So i gave the warfactories an small edit. Owner=GDI,GDIARMOR

CODE
Example coding from RO:
; GDI Starport
[GADROP]
Name=Starport
WeaponsFactory=yes
Factory=UnitType
Owner=GDI,GDIARMOR


And then made a clone of every GDI unit built by the AI. And gave to the originals, the ones that are going to be built by the player, Owner=GDIARMOR instead of Owner=GDI
After that I edited AI.ini to suit the changes made to the units, ensuring than the AI was only able to build the cloned units.

CODE
Example coding from RO:
; Medium Mech; built by the player
[MMCH]
Name=Titan
Owner=GDIARMOR

; Cloned Medium Mech; built by the AI
[CMMCH]
Name=Titan
Owner=GDI


Doing this, the result would be that the player could only build units with Owner=GDIARMOR on his warfactory and units with Owner=GDINAVAL on his shipyard.
However this is not the end, as you would have the cloned units in your build tab greyed out, and have the new constructions options bug every time you built a new unit/building. Finally, to have the logic properly working, I had to get rid of the bug, the edit is quite simple, an exploit of AI cheats.
Since the AI ignores the prerequisites, I gave all the AI clones an extra prerequisite, a dummy building which could be never be built by the player, in this way, the player wouldn't notice any change and have 2, or more alternate warfactories built from the conyard working without problems withing them.

CODE
Example coding from RO:
; Cloned Medium Mech; built by the AI
[CMMCH]
Name=Titan
Owner=GDI
Prerequisite=GDIFACTORY,DUMMYBUILD
;DUMMYBUILD exist in the building list, and has it's own entries to prevent any problem.


Finally I edited AI.ini. not a hard change just replaced the original unit entries with their cloned versions, be sure to do it in Firestorm too.

*Please notify if you encountered errors after applying it. I know it works (tested it myself a lot of times and also did test it my team), however I might have forgotten to add something in the tutorial.


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

Go to the top of the page
 
: | +Quote Post
ChielScape
post Jul 1 2007, 08:30 PM
Post #2


SSM Launcher
Group Icon

Group: Members
Posts: 799
Joined: 21-October 06
From: In ur BIOS, steeln ur Megahurtz!
Member No.: 33
Alliance: GDI
Favorite game: Tiberian Sun



As i said on PPM:


--------------------
Admin Note: Please refer to signature rules.
Go to the top of the page
 
: | +Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 28th March 2024 - 06:40 PM


XGhozt.com