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 Oct 15, 2024 6:07 am
All times are UTC + 0
TS Client: Unique MCVs and ConYards (*****)
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [30 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Mon Sep 14, 2015 12:47 am    Post subject:  TS Client: Unique MCVs and ConYards (*****)
Subject description: Exclusively works with the client's TS build
Reply with quote  Mark this post and the followings unread

Edit: Those adding a new faction to version 6.00 or later versions of the TS Client only need to follow these simple steps instead of the tutorial below:
  • Make sure that any new faction has its side-specific mix files present in the MIX folder (Sidec##.mix, SideCD##.mix and Speech##.mix; you can just copy the mix files from GDI or Nod initially)
  • Make sure to list all Harvesters and MCVs after HarvesterUnit=
  • Make sure all of the new faction's respective structures are specified in the [AI] section (specifically for BuildConst=, BuildPower=, BuildRefinery=, BuildBarracks=, BuildTech=, BuildWeapons=, BuildHelipad= and BuildRadar=). Be aware that you can enter multiple structures for BuildConst= now, so any new faction's Construction Yard needs to be listed there now.
  • Remember to add your new faction to Sides= in GameOptions.ini in the Resources folder.




For versions older than 6.00, carry on with the tutorial below.

- - - - - - - - - -

The Dawn of the Tiberium Age has had 4 well-functioning factions with separate MCVs and Construction Yards for a good while already and the work-arounds for this implementation have also improved over the years, especially when Iran’s spawner was made available.
Considering this spawner is also included with the TS Client’s game files and not everybody knows how to make the best use of the new modding features that both the spawner and the TS client offer, I figured this tutorial would be a good start.

For this tutorial I’m going to assume that all faction-specific MCVs and Construction Yards already exist. I’ll divide this tutorial in 3 parts 2 parts, which you might not all need depending on the kind of mod you’re making.
Edit: Part 3 is no longer necessary with the latest TS client version thanks to AlexB's "Side index improvements" patch.



Part 1: Getting unique MCVs and Construction Yards to work for 2 or more factions

The first obstacle is of course the MCV. Since BaseUnit= only accepts a single entry, we’ll have to prevent it from starting altogether and instead have the MCV start as a regular starting unit.
  • To do this, first open Resources\GameOptions.ini, look for [ForcedSpawnIniOptions] and add Bases=No and UnitCount=1 under it to prevent the specified BaseUnit from spawning and only having a single starting unit spawn instead. Also remove cmbUnitCount and lblUnitCount under both [GameLobby] and [SkirmishLobby] to remove the UnitCount setting from the game lobby because you're not going to want players to change this.
  • Next in INI\Rules.ini, add AllowedToStartInMultiplayer=no to every single unit aside from the MCVs to make sure that the single starting unit all players start with will be an MCV.
    All faction-specific MCVs of course need to have the correct owner specified and have TechLevel=1 to make sure they can start on all tech levels or alternatively TechLevel=-1 to make them unbuildable, but still allow them to spawn as starting units (you could then add a different MCV for the players to build instead).

Now to also get the AI to deploy its faction-specific MCV, there are two methods you can use:
  1. The most practical method is using a HEX-editor to apply a hack to game.exe, which changes the state of the AI’s starting units from Area Guard to Unload:  after opening game.exe with your HEX-editor, goto offset 0x001DEE37 and replace 0A with 0F.
  2. If there’s a reason why you don’t want to or can’t edit the game.exe file, you can instead give the MCVs DeployToFire=yes, GuardRange=512 and Primary= with a weapon specified that has Range=512 (any kind of weapon is fine, as long as it has Range=512: you could also simply use the Deployer weapon below).

Note: only use one of these methods and never both at the same time because that can cause the AI’s MCVs to not deploy again.

Now that you’ve got the MCVs working, you’ll likely first notice that the AI players won’t build anything at all, which brings us to the second obstacle.


The second obstacle is the BuildConst= key. Just like BaseUnit=, it only accepts a single entry and the problem is that AI players won’t build anything when they don’t own the specified BuildConst structure, while human players won’t be able to build any structures that only have a single owner specified.

The fact that BuildConst= only accepts a single entry makes it impossible to specify all faction-specific Construction Yards, meaning we need a work-around for that too. This is where the spawner comes in: the spawner allows you to pre-place units and structures on maps that are owned by specific players, which means that we can just pre-place these BuildConst structures on all maps.
While we could edit all maps and manually add these structures on them, this would end up becoming quite a chore (especially if there’s a lot of existing maps that need to be edited). Fortunately the client introduces GlobalCode.ini: any code entered in it will automatically be added to multiplayer maps when the client loads them and starts the game. We'll get back to this file later.

Although it’s perfectly possible to pre-place the BuildConst structures with some code, this causes problems with the WallOwner logic of the game: if there are any pre-placed walls on a map and there’s also pre-placed structures belonging to one of the Spawn# houses, any walls near them will then automatically also be owned by one of those Spawn# houses. So to get around this we’ll instead pre-place units on the map, which will then immediately deploy into the BuildConst structures when the game starts via a deployer weapon.
First off add the code for the structure, unit and its weapon to Rules.ini (for convenience the IDs will be BUILDCONST for the structure and BLDCNSTU for the unit):
Code:
[BUILDCONST]
Image=GALITE
Name=BuildConst Structure
Strength=600
Armor=wood
TogglePower=no
Selectable=no
Immune=yes
LegalTarget=no
Insignificant=yes
BridgeRepairHut=yes
PlaceAnywhere=yes
InvisibleInGame=yes
BaseNormal=no

[BLDCNSTU]
Image=
Name=BuildConst Unit
ROT=16   ;with 0 and no Speed= value it's unable to deploy
Strength=1
Selectable=false
Insignificant=yes
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
DeploysInto=BUILDCONST
Secondary=Deployer
DeployToFire=yes
GuardRange=512

[Deployer]
Damage=0
Range=512
Projectile=Invisible
Warhead=Super

After doing this, search for [AI] in Rules.ini and replace BuildConst= and its entry with BuildConst=BUILDCONST, add BUILDCONST to the [BuildingTypes] list and you’re set.

Now that the code has been added to Rules.ini, you only need to make sure the BLDCNSTU unit is present on every map when the game to starts, bringing us back to the GlobalCode.ini file I mentioned earlier.
Open INI\Map Code\GlobalCode.ini (or create it first if it doesn’t exist already) and add the following code:
Code:
[Units]
FFS=Spawn1,BLDCNSTU,256,0,0,64,Unload,None,0,-1,0,-1,1,0
FFT=Spawn2,BLDCNSTU,256,1,0,64,Unload,None,0,-1,0,-1,1,0
FFU=Spawn3,BLDCNSTU,256,2,0,64,Unload,None,0,-1,0,-1,1,0
FFV=Spawn4,BLDCNSTU,256,3,0,64,Unload,None,0,-1,0,-1,1,0
FFW=Spawn5,BLDCNSTU,256,4,0,64,Unload,None,0,-1,0,-1,1,0
FFX=Spawn6,BLDCNSTU,256,5,0,64,Unload,None,0,-1,0,-1,1,0
FFY=Spawn7,BLDCNSTU,256,6,0,64,Unload,None,0,-1,0,-1,1,0
FFZ=Spawn8,BLDCNSTU,256,7,0,64,Unload,None,0,-1,0,-1,1,0


To clarify a few things:
  • The index at the beginning of the lines uses 3 letters to make sure that it always is added at the bottom of index lists so that it won’t change the indexes of other units that were pre-placed on a map and thus risk breaking the FollowsID logic for trains.
  • The Deployer weapon only makes the AI’s BLDCNSTUs automatically deploy and doesn’t affect those that belong to the human players.
  • All BLDCNSTUs are set to the Unload state, which causes the ones owned by human players to automatically deploy, but doesn’t affect those belonging to AI players.

This concludes the first and most important part of the tutorial. As you might have guessed, it is necessary to always play with Short Game disabled now (which can also be disabled permanently by editing Resources\GameOptions.ini), but if you want to put in the extra work it’s perfectly doable to get Short Game working again.



Part 2: Getting Short Game to work again

When the Short Game option is enabled, it makes players instantly die when they own no structures or no BaseUnit and considering that after having applied the above work-around players no longer start with a BaseUnit, they now always instantly die when the game starts.
So how do we get around this? By making players start with a BaseUnit of course.
First we’ll have to add the code for this BaseUnit in Rules.ini (for convenience the ID will be BASEUNIT):
Code:
[BASEUNIT]
Image=   
Strength=1
Immune=yes
LegalTarget=no
SpeedType=Amphibious
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
Selectable=false
After adding that, search Rules.ini for BaseUnit=, replace it and its entry with BaseUnit=BASEUNIT and also add BASEUNIT to the [VehicleTypes] list.

Now open INI\Map Code\GlobalCode.ini and add the following code:
Code:
[Events]
BaseUnit=1,13,0,125

[Actions]
BaseUnit=1,32,0,0,0,0,0,0,A

[Triggers]
BaseUnit=Neutral,<none>,Destroy BaseUnit,0,1,1,1,0

[Tags]
BaseUnitTag=0,Destroy BaseUnit 1,BaseUnit

[Units]
FFK=Spawn1,BASEUNIT,256,0,2,64,Guard,BaseUnitTag,0,-1,0,-1,1,0
FFL=Spawn2,BASEUNIT,256,1,2,64,Guard,BaseUnitTag,0,-1,0,-1,1,0
FFM=Spawn3,BASEUNIT,256,2,2,64,Guard,BaseUnitTag,0,-1,0,-1,1,0
FFN=Spawn4,BASEUNIT,256,3,2,64,Guard,BaseUnitTag,0,-1,0,-1,1,0
FFO=Spawn5,BASEUNIT,256,4,2,64,Guard,BaseUnitTag,0,-1,0,-1,1,0
FFP=Spawn6,BASEUNIT,256,5,2,64,Guard,BaseUnitTag,0,-1,0,-1,1,0
FFQ=Spawn7,BASEUNIT,256,6,2,64,Guard,BaseUnitTag,0,-1,0,-1,1,0
FFR=Spawn8,BASEUNIT,256,7,2,64,Guard,BaseUnitTag,0,-1,0,-1,1,0

Make sure that you don’t overwrite the [Units] section that you added in Part 1 of this tutorial.

You can optionally change the time before the BaseUnit disappears and Short Game is activated by editing the line under [Events] and change 125 to whatever you like (125 translates to about 2 minutes with the game speed at 60 FPS).

And that’s all it takes to get Short Game working again. First of all the code above pre-places an invulnerable BaseUnit on maps when the game starts and it has a trigger attached to it to make it automatically disappear again after about 2 minutes. This means that players have 2 minutes to deploy their MCV before Short Game activates and after those 2 minutes they’ll instantly die when they have no structures left. Keep in mind that players will also instantly die if they have no structures, but do have an MCV and there’s unfortunately no way to prevent this.



Part 3: Structure prerequisites and owners for 3+ factions

Because TS was only meant to support 2 factions, having 3 or more factions can be very problematic when it comes to prerequisites and messing with these can cause issues such as the infamous NCO (“No Construction Options”) bug, structures might not appear on the sidebar or the AI refuses to build them.
So to prevent these issues, you first need to know exactly what causes them.
  • I mentioned before that structures that only have a single owner will only appear on the sidebar when a player owns the BuildConst structure: this is actually only half true. Structures with only one owner can only appear on the sidebar for the first two factions (GDI and Nod), while all other factions require structures to have 2 owners to make them appear on the sidebar.
  • Structures with more than a single owner will appear on the sidebar for every single faction (regardless of which owners are specified), unless the structure’s prerequisites prevent this.
  • Any structure (or unit) that’s visible on the sidebar for a faction that’s not specified as the owner will cause the NCO bug for that faction.
  • The AI can’t build any structures that have the Construction Yard specified as a prerequisite.

So since structures with only a single owner only appear on the sidebar for the first two factions, there’s no way around having to specify a secondary owner (such as Civilian) for every single structure of at the very least the new factions (but you’re actually best off doing this for as many factions as possible). So in GDI’s case you’d specify Owner=GDI,Civilian for every single structure for example.
Once you’ve done this, you’ll have to prevent these structures from appearing on the sidebar of all factions by specifying the Construction Yard as a prerequisite for all of them and keep in mind that it’s only possible for two factions to share the same structure if you modify one of the prerequisite categories (such as for example PrerequisiteBarracks=) and make it include the Construction Yards of both factions.
That said however, you might not have enough prerequisite categories available for everything you want to do, because (as explained below) you’ll also need them to make the AI able to build anything. You’ll have to plan how you’re going to use the prerequisite categories very carefully and since PrerequisiteGDIFactory= and PrerequisiteNodFactory= can only be used by vehicles, you actually only have 5 of them available.

As mentioned before, the AI can’t build anything that has a Construction Yard specified as a prerequisite, but you’re still forced to do so. So to make the AI able to build these structures again, you’ll have to make use of the prerequisite categories.
First add a new structure that will serve as a dummy for the AI to use as a prerequisite instead of a Construction Yard. This structure can be anything and look like anything, so you could for example simply make it look like a power plant, make it into an upgrade for the Construction Yard or whatever else you can think of.
All factions can share the same dummy structure (if it’s not an upgrade) or they can have a unique structure, just make sure that only the AI can build it: give it TechLevel=-1. While this tech level prevents human players from building a structure (or unit), it instead allows the AI to build it on every single tech level.

Now that that’s done you’ll have to use prerequisite group for every single faction uses a Construction Yard as a prerequisite for its structures and then specify the prerequisite group instead of the Construction Yard.
For example use: PrerequisiteBarracks=GACNST,AIDUMMY1 and then specify Prerequisite=BARRACKS,GAWEAP,GARADR for GDI’s tech center.
AIDUMMY1 here is whatever structure you’re using as the dummy structure for the AI (as mentioned before, it can be whatever you want, as long as only the AI can build it). To make sure that the AI can properly use every prerequisite group, you need to make sure that the matching BuildXXX key (for PrerequisiteBarracks that’s BuildBarracks for example) includes a structure that doesn't have a prerequisite (the easiest option here is to just use the AI dummy structure, but you can for example also use a power plant).


And that that should be all. Let me know if you run into any difficulties or if I missed something.


There’s no part 4, but if you also need a method to make the AI replace its MCVs, you can use SuperJoe’s method, starting from:
SuperJoe wrote:
And as promised here are instructions on how to make AI replace lost con.yards. It's actually more effective than what the original game uses.

I believe that you do need to give the MCVs Secondary=DeployWeapon to make this work (the code for that is posted in that topic as well).

_________________

Last edited by Bittah Commander on Tue Mar 19, 2024 1:17 am; edited 13 times in total

Back to top
View user's profile Send private message ModDB Profile ID YouTube User URL Facebook Profile URL
Darkstorm
Commander


Joined: 20 Jan 2008
Location: Texas

PostPosted: Mon Sep 14, 2015 1:25 am    Post subject: Reply with quote  Mark this post and the followings unread

Excellent tutorial. If I may ask, could you do another tutorial on how to replace the walltower structure properly. I've been getting IEs whenever I try to replace it with a dummy upgrade.

Back to top
View user's profile Send private message ModDB Profile ID
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Mon Sep 14, 2015 1:33 am    Post subject: Reply with quote  Mark this post and the followings unread

That requires a fairly short answer, so it doesn't really require a tutorial. Simply replace the structure specified after WallTower= with an upgrade that the AI can build fairly early in the game and it should work fine. In DTA I use an invisible upgrade for the refinery that only the AI can build for this purpose, but you could also simply specify the power turbine for example.

_________________

Last edited by Bittah Commander on Sat Feb 20, 2016 3:13 pm; edited 1 time in total

Back to top
View user's profile Send private message ModDB Profile ID YouTube User URL Facebook Profile URL
Darkstorm
Commander


Joined: 20 Jan 2008
Location: Texas

PostPosted: Mon Sep 14, 2015 1:51 am    Post subject: Reply with quote  Mark this post and the followings unread

Well then I must be having some sort of other issue because it did the same crash whenever I did that.

EDIT: I should apologize for derailing the topic though. I'll post more about this in my topic on the TS Editing Forum if I can't figure it out myself. I might consider switching my method here to this since it preserves short game and is generalized for every map.

Back to top
View user's profile Send private message ModDB Profile ID
luxycomplex
Cyborg Soldier


Joined: 03 Nov 2012

PostPosted: Mon Sep 14, 2015 4:32 pm    Post subject:  The 3rd and 4th side working finally.. Reply with quote  Mark this post and the followings unread

Very Happy  Very Happy  Very Happy

I should have asked this tutorial ages ago..

Crystallized Doom now works under the new Client with this tutorial. I only have to edit game.exe with hex editor to make AI deploy their MCV and game run as expected..
The current version of the mod that I use as 'experiment' still required Unit Count=2 and Short Game=False.

First issue I encounter so far is 'H' (Home) key, if human player uses Starting Point other than 1 then using that key will jump the camera to AI's base that occupies the 1st Starting Point..

The important thing for me is: now I have sample mod that uses Tiberian Sun terrain with more than two playable sides...
Which mean I can continue my own mod happily...
Muahha..haa... Very Happy  Laughing

Back to top
View user's profile Send private message
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Mon Sep 14, 2015 5:10 pm    Post subject: Reply with quote  Mark this post and the followings unread

Pressing H to go back to your base indeed doesn't work anymore with this method, so you'll have to press F9 instead.

_________________

Back to top
View user's profile Send private message ModDB Profile ID YouTube User URL Facebook Profile URL
malius123
Disk Thrower


Joined: 14 Aug 2010

PostPosted: Thu Jan 14, 2016 8:15 am    Post subject: Reply with quote  Mark this post and the followings unread

what code is responsible for making new factions selectable in ts client during the skirmish menu, i always thought it was [SIDES], [HOUSES] and [Country Statistics] used in conjunction with one another, but using ts client it doesnt appear to work for me(no doubt due to my lack of understanding and experience).here's example code

Code:

[Houses]
0=GDI
1=Nod
2=ShadowO
3=RaiderF
4=Neutral
5=Special


[Sides]
GDI=GDI
Nod=Nod
ShadowO=ShadowO
RaiderF=RaiderF
Civilian=Neutral
Mutant=Special
 ;Country Statistics

[ShadowO] ; This is the new Shadow order faction
Name=Shadow Order
Suffix=SO
Prefix=S
Color=DarkTeal
Multiplay=yes
Side=ShadowO ;
SmartAI=yes    ;

[RaiderF] ; This is the new raider faction
Name=Raiders
Suffix=RFI
Prefix=R
Color=DarkCyan
Multiplay=yes
Side=RaiderF ;
SmartAI=yes    ;

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Thu Jan 14, 2016 9:48 am    Post subject: Reply with quote  Mark this post and the followings unread

Go to Resources\GameOptions.ini -> Sides=GDI,Nod,ShadowO,RaiderF
You will need side specific icon png file as well for dropdowns.

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


Joined: 14 Aug 2010

PostPosted: Sat Feb 20, 2016 10:39 am    Post subject: Reply with quote  Mark this post and the followings unread

sorry for the late reply, been putting off implementing this in my mod, i've done all the gameoptions.ini  you suggested, but for the life of me i cant find any references to gdiicon.png or nodicon.png ( the clients vanilla side icons for the skirmish lobby) in any of the resources folder ini files,  even  tried a quick Shift+F in some of the ini's in the ini folder (the usual suspects Art.ini and a few others) could you tell me what ini deals with referencing the sides icon. or is it just a matter of creating ShadowOicon.png and RaiderF.png and simply placing them in the game options folder  and the client applies them automatically?

thanks in advance you've already been a great help

Back to top
View user's profile Send private message
^Rampastein
Rampastring


Joined: 11 Oct 2008
Location: Gensokyo

PostPosted: Sat Feb 20, 2016 11:46 am    Post subject: Reply with quote  Mark this post and the followings unread

Yes, just create shadowoicon.png and raiderficon.png to the Resources\ directory and the client will use them automatically, if you use E1 Elite's code that is. It's just <side name>icon.png.

_________________
CnCNet Client | CnCNet TS patches | More Quality-of-Life Improvements for RA Remastered


Back to top
View user's profile Send private message ModDB Profile ID Facebook Profile URL
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Sat Feb 20, 2016 2:07 pm    Post subject: Reply with quote  Mark this post and the followings unread

I just noticed that the last sentence of Part 3 (concerning the BuildXXX key) was incomplete, so that's fixed now. I'm surprised that nobody pointed it out #Tongue

Also, concerning pressing the H button to center the screen on your ConYard: you could get this to work again by changing the button for "View Bookmark 1" or "View Bookmark 4" from F9 or F12 to H and then including the Keyboard.ini file with your mod.

_________________

Back to top
View user's profile Send private message ModDB Profile ID YouTube User URL Facebook Profile URL
malius123
Disk Thrower


Joined: 14 Aug 2010

PostPosted: Wed Mar 02, 2016 10:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

i don't know what E1 Elite's code means, i will contine to research this further to grasp a better understanding. i believe im using your client and assume that it uses the code you mention.

ps. thanks for all the info guys. tremendous help.

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Thu Mar 03, 2016 4:29 am    Post subject: Reply with quote  Mark this post and the followings unread

The code mentioned is simply this: GameOptions.ini -> Sides=GDI,Nod,ShadowO,RaiderF
Exact spelling for sides to be used in its icon filenames.

Back to top
View user's profile Send private message
e1k3
Civilian


Joined: 25 Jan 2015

PostPosted: Wed Jul 19, 2017 3:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

i really dont understand what im doing wrong here... i followed this tutorial precisely in like 3 attempts (skipped step 2) and finally it at least works beyond crashing during loading screen, but everything else is utterly screwed now.

third faction randomly has 3 refineries, both gdi and nod stuff but none of theirs, ai does nothing at all. players get spawned owning nothing but pre placed map structures like civilian armory or sam sites. harvesters cant harvest. game crashes occasionally.

im really frustrated here, i just spent 3 free days trying to get the 3rd faction logic to work (i have structures and the tech tree and everything else already planned and mapped out) but i just cant get past the "get the basic logic to work at all" phase. sorry for venting.

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Thu Jul 20, 2017 10:44 am    Post subject: Reply with quote  Mark this post and the followings unread

I would consider the 3rd side incomplete without the new side's sidebar.
Current TS Client Game.exe might not contain the hacks for additional
side's sidebar and speech mix files.

I believe, alternative to the Part 3 mentioned above might have got more
hacks from AlexB. But I couldn't find buildconst_harvesterunit_baseunit.asm,
sideindex_improvements_v2.asm in the Github ts-patches repository.

Sideindex_improvements v2 is there in a different thread but not the other
hack.

Back to top
View user's profile Send private message
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Thu Jul 20, 2017 5:48 pm    Post subject: Reply with quote  Mark this post and the followings unread

While DTA does make use of the patches you mentioned, they actually don't work together with this tutorial at all and DTA shouldn't be used as a reference for how to apply this tutorial because of this. The necessary patches to get a unique sidebar and speech files to work for the third faction are included in dta_hacks.asm, but that unfortunately can't just be enabled for the TS client since it comes with a bunch of other patches that wouldn't be fitting. Maybe Rampastring could upload a new update for the TS client with only the necessary patches for this at some point, but they'll have to be properly split up into 2 separate .asm files first.
e1k3 wrote:
third faction randomly has 3 refineries, both gdi and nod stuff but none of theirs

This reason why structures from other factions appear on the sidebar is because you didn't include the construction yard as one the prerequisites for every structure. A Nod refinery should have a Nod Power Plant and a Nod Construction Yard as its prerequisite for example.
And the reason why none of the third faction's structures appear on the sidebar when you play as this faction is because all of the third faction's structures need to have at least 2 owners. It doens't matter who the second owner is, as long as it exists (so just use Civilian as the second owner for convenience).
e1k3 wrote:
ai does nothing at all.

This happens when it doesn't own a BuildConst structure, as explained in Part 1. I did notice that the path of GlobalCode.ini was moved from INI\GlobalCode.ini to INI\Map Code\GlobalCode.ini since I wrote this patch though and having GlobalCode.ini in its old location would prevent the game from finding it and thus cause your problem. I've edited my first post now to fix the path.
e1k3 wrote:
players get spawned owning nothing but pre placed map structures like civilian armory or sam sites.

Verify that the order of the [Houses] list is correct. First you should have all playable factions and then the unplayable (MultiplayPassive) ones. Example:
Code:
[Houses]
0=GDI
1=Nod
2=3rdFaction
3=Neutral
4=Special

If you added more unplayable factions (for the naval yard work-around for example), those factions should come after Neutral and Special. Example:
Code:
[Houses]
0=GDI
1=Nod
2=3rdFaction
3=Neutral
4=Special
5=GDI1
6=GDI2
7=Nod1
8=Nod2
9=3rdFaction1
10=3rdFaction2

e1k3 wrote:
harvesters cant harvest.

This most likely means that they have no refinery to return to. Make sure that all harvesters have every refinery you want them to be able to unload at specified after Dock= in the harvester's code. Harvesters are unable to harvest if the player owns none of the specified docks.
e1k3 wrote:
game crashes occasionally.

It's likely caused by one of the things mentioned above and thus might already be fix once those issues are solved. Keep in mind that the game will also often crash if the AI can't build the unit that's specified for HarvesterUnit= and it runs out of money. HarvesterUnit= only accepts a single entry and this single unit needs to be buildable for all AI players.
So if all factions have different looking harvesters in your mod, the easiest solution would be to also add a generic harvester that's used by all factions (and possibly only make it buildable for AI players). Another solution could be to make the HarvesterUnit into an invisible HunterSeeker with an extremely high FlightLevel= value, very slow speed/acceleration and a weapon with Damage=0 so that the AI will just build this invisible dummy unit instead of a real harvester. The downside of this is of course that the AI will then only have a single (FreeUnit) harvester per refinery that won't be replaced when it's destroyed.

_________________

Back to top
View user's profile Send private message ModDB Profile ID YouTube User URL Facebook Profile URL
E1 Elite
General


Joined: 28 May 2013

PostPosted: Thu Jul 20, 2017 6:53 pm    Post subject: Reply with quote  Mark this post and the followings unread

Any chance of sharing AlexB's buildconst_harvesterunit_baseunit.asm and
sideindex_improvements_v2.asm?

Are these the ones that makes BuildConst have multiple values and switching
MCV to those defined in HarvesterUnit and make better use of prereqs in
DTA?

Back to top
View user's profile Send private message
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Thu Jul 20, 2017 8:58 pm    Post subject: Reply with quote  Mark this post and the followings unread

I'm afraid they're not up for sharing because they're technically still unfinished patches and AlexB strongly insists on not having his WIP patches publicly shared. I only included the patches in dta.mk on the repo because I eventually got fed up with having my local repo constantly break after a pull whenever there were any changes to dta.mk.

Edit:
It seems that sideindex_improvements_v2.asm was already made public by AlexB himself. I guess that patch is finished after all, so I'll go ahead and upload it to the repo some time soon.
This patch makes it unnecessary to use the Construction Yard as a prerequisite for all structures and also removes the need to have 2 owners for every single structure that's owned by the third faction.

_________________

Back to top
View user's profile Send private message ModDB Profile ID YouTube User URL Facebook Profile URL
E1 Elite
General


Joined: 28 May 2013

PostPosted: Fri Jul 21, 2017 6:32 am    Post subject: Reply with quote  Mark this post and the followings unread

So, AlexB's buildconst_harvesterunit_baseunit.asm hack remains exclusive
and is not for sharing. OK, fine.

Back to top
View user's profile Send private message
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Sat Aug 19, 2017 7:00 pm    Post subject: Reply with quote  Mark this post and the followings unread

The latest TS Client update now includes AlexB's "Side index improvements" patch, which means that Part 3 of this tutorial is no longer necessary.
The patch makes it unnecessary to give structures for the third faction at least 2 owners and also prevents the "No Construction Options" bug. This means that it's also no longer necessary to use the Construction Yard as a prerequisite for every structure when you have a unique Construction Yard for 2 or more factions.

_________________

Back to top
View user's profile Send private message ModDB Profile ID YouTube User URL Facebook Profile URL
E1 Elite
General


Joined: 28 May 2013

PostPosted: Tue Aug 22, 2017 7:26 am    Post subject: Reply with quote  Mark this post and the followings unread

Attaching a sample for making a 3rd side with TS Client. It contains two
examples, first one uses same MCV and ConYard for all sides like vanilla
TS which is simple. Second one uses different MCV and ConYards but is
a bit complex.



TSClient3rdSide.rar
 Description:

Download
 Filename:  TSClient3rdSide.rar
 Filesize:  1.62 MB
 Downloaded:  73 Time(s)


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


Joined: 09 May 2011
Location: Approaching the Great Pyramid

PostPosted: Sun Sep 03, 2017 3:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

why not make it work with normal ts/fs game.exe Sad

_________________
Quote:

how did we end up here ?

this place is horrible ...

smells like balls ...


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


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sun Sep 03, 2017 4:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

Exley wrote:
why not make it work with normal ts/fs game.exe Sad

Because
-it simply doesn't work (due to hex edits done to the client version of game.exe)
-the Client is the de facto new standard of TS. Vanilla TS is obsolete.

Why do you care? You don't even have TS installed anymore.

_________________
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
Exley
Commander


Joined: 09 May 2011
Location: Approaching the Great Pyramid

PostPosted: Wed Sep 06, 2017 7:11 pm    Post subject: Reply with quote  Mark this post and the followings unread

i forgive you

_________________
Quote:

how did we end up here ?

this place is horrible ...

smells like balls ...


Back to top
View user's profile Send private message
Iran
Pyro Sniper


Joined: 23 Mar 2011

PostPosted: Wed Sep 06, 2017 7:53 pm    Post subject: Reply with quote  Mark this post and the followings unread

i don't

Back to top
View user's profile Send private message
e1k3
Civilian


Joined: 25 Jan 2015

PostPosted: Tue Jan 02, 2018 10:38 pm    Post subject: Reply with quote  Mark this post and the followings unread

so, it's me again and i currently give this another shot.

i downloaded a fresh Twisted Insurrection installation and completed step 1. i also copied an icon (the GT one, for testing purposes) for my faction which loads correctly and set everything up according to this tutorial.

the game crashes reliably during load screen. i will attach a copy of my rules. ini so you guys can look at it and maybe help me out here.
has something changed in the meantime or am i just being retarded?

Thank you in advance

edit: i forgot to add further structures for the new faction besides the mcv and construction yard, maybe this caused the IE. i will makeshift some and report back.

Edit2: yup, I’m ztyping stupid, my apologies. For some reason I went straight past the „only works on TS client“ and tinkered with twisted insurrection; assuming it would work the same way. Sorry for your troubles.
If there is a way to get it to work in TI, I’d love to hear it since I really dig the new aethetics and maps.



Rules.ini
 Description:
(standard TI rules with autorepair, repairable walls, and some props enabled, i also made a flying transport for gdi; none of this should affect this tutorial i believe)

Download
 Filename:  Rules.ini
 Filesize:  628.83 KB
 Downloaded:  25 Time(s)


Back to top
View user's profile Send private message
A.Productions
Vehicle Drone


Joined: 17 Aug 2019

PostPosted: Fri Sep 20, 2019 12:49 pm    Post subject: Reply with quote  Mark this post and the followings unread

I altered GameOptions.ini and rules but random units keep spawning when Skirmish is started even though **AllowedToStartInMultiplayer** is set to "no" on every unit.
The MCV's have that value set to "Yes".
Is there another value that prevents the MCV from appearing?

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Sun Jan 17, 2021 2:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

Attaching Example 3 for sample 3rd side with unique MCV and ConYards. This example uses AlexB's buildconst_harvesterunit_baseunit.asm patch and is much simpler.



3rdSideExample3.7z
 Description:

Download
 Filename:  3rdSideExample3.7z
 Filesize:  2.72 MB
 Downloaded:  56 Time(s)


Back to top
View user's profile Send private message
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Sun Dec 05, 2021 12:08 am    Post subject: Reply with quote  Mark this post and the followings unread

Version 6.00 of the TS Client is out now, which makes this tutorial obsolete. Just make sure the new faction has all side-specific .mix files, has the correct Harvesters and MCVs specified for HarvesterUnit= (read the comments in rules.ini for clarification) and has all of its respective structures specified in the [AI] section (this includes adding the new side's Construction Yard to BuildConst=, which allows multiple structures to be specified now).

_________________

Back to top
View user's profile Send private message ModDB Profile ID YouTube User URL Facebook Profile URL
E1 Elite
General


Joined: 28 May 2013

PostPosted: Wed Dec 15, 2021 1:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

Attaching another 3rd side example for the recently released TSClient 6.00. Compared to my previous Example 3, this one doesn't need applying patches to game.exe as TSClient 6.00 already has the needed hacks applied.

Included Info.txt has direction for setup and modders can compare included original and modified files for changes.



3rdSideExample4.7z
 Description:

Download
 Filename:  3rdSideExample4.7z
 Filesize:  338.84 KB
 Downloaded:  51 Time(s)


Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [30 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: 2.9457s ][ Queries: 13 (2.6218s) ][ Debug on ]