:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::
Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Wed Oct 18, 2017 2:32 pm
All times are UTC + 0
 Forum index » Modding Central » Tiberian Sun Editing Forum » Tutorials Factory
Multiple MCVs, con.yards and factions (*****)
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 2 of 2 [71 Posts] View previous topic :: View next topic
Goto page: Previous 1, 2
Author Message
Iran
Cyborg Specialist


Joined: 23 Mar 2011

PostPosted: Sun Mar 30, 2014 9:28 pm    Post subject: Reply with quote

What INI keys are broken for these workaround to be needed?

Back to top
View user's profile Send private message
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyörgy, Hungary

PostPosted: Sun Mar 30, 2014 9:47 pm    Post subject: Reply with quote

BaseUnit accepts only a single entry, AFAIK. Or maybe BuildConst is bonkers. Maybe both.
_________________



AS Discord server: https://discord.gg/7aM7Hm2

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


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Sun Mar 30, 2014 11:39 pm    Post subject: Reply with quote

Both BaseUnit and BuildConst accept only one entry and that's what makes it necessary to come up with some sort of work-around if you want to add more factions.

Tiberian Sun only uses a single Construction Yard for both GDI and Nod, which is specified after BuildConst= and this same construction yard can't also be used for newly added factions (no structures will appear on the sidebar for the new faction unless they're given a different construction yard).
Even if you don't wanna add a new faction, people might want to use a different image for the GDI and Nod construction yards, but BuildConst only accepting one entry makes this impossible.
The AI also won't deploy its MCV if the structure specified after DeploysInto= is not the structure that's also specified after BuildConst= and it won't also build anything even if does own a Construction Yard, but it does not own the structure specified after BuildConst=.

Last edited by Bittah Commander on Sun Mar 30, 2014 11:42 pm; edited 1 time in total

Back to top
View user's profile Send private message Send e-mail MSN Messenger
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Sun Mar 30, 2014 11:40 pm    Post subject: Reply with quote

SuperJoe wrote:
While attaching limpets into infantry does not seem to slow the infantry down or change its selection box color, it does make it reveal terrain for you.


Found kind of a solution to this. if you set Sight=0 for the starting infantry units, they will not reveal anything even when infected by the limpet logic. I thought the limpet had a fixed shroud reveal range, at least from what I recall it would always reveal shroud at a range of about 4-5, no matter what unit it had infected. Either I remember wrong or the limpet shroud reveal behaves differently for infantry. For infantry the shroud reveal range is the Sight value of the infected infantry.

Regardless, this should work now and allow getting rid of all the map triggers. Though in return every player starts with 1 infantry unit (in addition to the MCV), and that infantry unit has to have Sight=0. It should also have MoveToShroud=no so you can't order and lose him under the shroud.

Which of these methods is preferable? The one with 2 map triggers (for every map) or the extra starting unit with Sight=0?


Iran wrote:
What INI keys are broken for these workaround to be needed?


As Graion mentioned, BaseUnit and BuildConst only accept one value. BaseUnit is not THAT big a deal as it can be circumvented, but BuildConst specifically causes problems for side-specific con.yards and the AI (which this tutorial goes long ways to get around).
_________________

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


Joined: 28 May 2013

PostPosted: Mon Mar 31, 2014 7:06 am    Post subject: Reply with quote

Spent few minutes to put limpet logic but running into complications. Can you give the code change with limpet logic.

Edit: Got it working with limpet logic. Sometimes the starting human mcv shows the unable to deploy cursor even if it is far from the starting infantry!
Sometimes it shows deploy cursor but does not deploy. Moreover, the attaching effect of limpet is not perfect, sometimes one of the AI mcv starts
moving towards the opponents infantry.

Last edited by E1 Elite on Mon Mar 31, 2014 9:22 am; edited 2 times in total

Back to top
View user's profile Send private message
Iran
Cyborg Specialist


Joined: 23 Mar 2011

PostPosted: Mon Mar 31, 2014 7:30 am    Post subject: Reply with quote

BaseUnit= is used as if it only takes on value, both reading from RULES.INI and actual uses with for example spawning. It's only used in a few spots so it's not that hard to fix.

BuildConst takes a list and sometimes is broken about it, there's a lot of generated code as internally the BuildConst values are stored in a dynamic array of UnitType IDs. Don't know what's wrong with it but it doesn't take that long to find out. Problem is the way the game code uses the dynamic vector.

It's probably why CCHyper already has those two fixed.

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


Joined: 03 Sep 2009

PostPosted: Mon Mar 31, 2014 2:15 pm    Post subject: Reply with quote

Heh here's another weird alternative to fix the HELPER vehicle issue. Instead of giving it any weapons, just give it

Code:

[HELPER]
...
MovementRestrictedTo=Rock
SpeedType=Creep ; Would need to take over one SpeedType for it

[Rock]
Creep=100%


Now each HELPER vehicle starts on top of a cliff or some other terrain with Land=Rock. The AI will deploy the vehicles on the impassable terrain, while the human HELPER will just sit there, not blocking anyone since cliffs are meant to be impassable anyway. Since it has Insignificant=yes it would blow up when the human player has lost.

But on my quick test I did notice one starting location where you wouldn't get a HELPER vehicle at all because there were no cliffs or other Land=Rock terrain nearby. So it would require any maps to have cliffs or a rock or something somewhere around the spawn location. Though it can be fairly far away.

But yeah, if Iran can fix the core problem itself there isn't much need for any of this. I won't update the tutorial unless I find a way to remove the map triggers in a way that creates zero side-effects.
_________________

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


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Mon Mar 31, 2014 2:45 pm    Post subject: Reply with quote

Have you taken a look at the work-around I used to get 4 factions to work in DTA?

The AI MCVs deploy via a dummy weapon with DeployToFire=yes and the Construction Yard then spawns an unselectable free unit. This unit looks like a barrel and can be destroyed with a single shot; it will simply remain next to the Construction Yard in human bases, while the AI will immediately deploy it into the BuildConst structure.

UnitCount is locked at 2 (1 would've been better, but back then it would still always change to 2 when hosting a LAN game) and the starting unit prices are tweaked so that you'll always start with just the BaseUnit and 1 MCV (or only the MCV if Bases are disabled, but it's kinda pointless to disable bases if you're getting an MCV anyhow).

The BaseUnit is a HunterSeeker with FlightLevel=20000, Strength=1 and Primary=Pistola (any weapon with Damage=1 will do). Thanks to this the HunterSeeker will spend the first few minutes of the game (about as much time as it takes to build a power plant+barracks+Refinery) climbing to that flight level and once it gets there, it flies off towards a random target (often another player's BaseUnit) and self-destructs.
This Hunter Seeker BaseUnit is what allows you to have an MCV that's not the BaseUnit, without having to sacrifice Short Game. The only downside of this is that failing to deploy your MCV before the BaseUnit self-destructs will make a player instantly lose if Short Game is enabled, but given this takes about as long as it takes to build a refinery (or you can make it take even longer by increasing the flight level), this shouldn't happen unless a player completely fell asleep or something.

You of course still hear "Unit Lost" when the Base Unit self-destructs, but since it doesn't happen right at the start of the match, I think it's only a small matter.
_________________

Back to top
View user's profile Send private message Send e-mail MSN Messenger
CCHyper
Defense Minister


Joined: 07 Apr 2005

PostPosted: Mon Mar 31, 2014 3:04 pm    Post subject: Reply with quote

Iran wrote:
BaseUnit= is used as if it only takes on value, both reading from RULES.INI and actual uses with for example spawning. It's only used in a few spots so it's not that hard to fix.

BuildConst takes a list and sometimes is broken about it, there's a lot of generated code as internally the BuildConst values are stored in a dynamic array of UnitType IDs. Don't know what's wrong with it but it doesn't take that long to find out. Problem is the way the game code uses the dynamic vector.

It's probably why CCHyper already has those two fixed.


Once I get some free time to bug test the fixes, I will release the fix.

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


Joined: 03 Sep 2009

PostPosted: Mon Mar 31, 2014 3:40 pm    Post subject: Reply with quote

Bittah Commander wrote:
Have you taken a look at the work-around I used to get 4 factions to work in DTA?

The AI MCVs deploy via a dummy weapon with DeployToFire=yes and the Construction Yard then spawns an unselectable free unit. This unit looks like a barrel and can be destroyed with a single shot; it will simply remain next to the Construction Yard in human bases, while the AI will immediately deploy it into the BuildConst structure.

UnitCount is locked at 2 (1 would've been better, but back then it would still always change to 2 when hosting a LAN game) and the starting unit prices are tweaked so that you'll always start with just the BaseUnit and 1 MCV (or only the MCV if Bases are disabled, but it's kinda pointless to disable bases if you're getting an MCV anyhow).

The BaseUnit is a HunterSeeker with FlightLevel=20000, Strength=1 and Primary=Pistola (any weapon with Damage=1 will do). Thanks to this the HunterSeeker will spend the first few minutes of the game (about as much time as it takes to build a power plant+barracks+Refinery) climbing to that flight level and once it gets there, it flies off towards a random target (often another player's BaseUnit) and self-destructs.
This Hunter Seeker BaseUnit is what allows you to have an MCV that's not the BaseUnit, without having to sacrifice Short Game. The only downside of this is that failing to deploy your MCV before the BaseUnit self-destructs will make a player instantly lose if Short Game is enabled, but given this takes about as long as it takes to build a refinery (or you can make it take even longer by increasing the flight level), this shouldn't happen unless a player completely fell asleep or something.

You of course still hear "Unit Lost" when the Base Unit self-destructs, but since it doesn't happen right at the start of the match, I think it's only a small matter.


All of these methods have different small side-effects. I had one more method that would force Bases=no and have the HELPER unit deploy for humans as well as the AI. This time the side-effect being EVA's "cannot deploy here" at the start of the match (as the MCV tries to insta deploy, but failing as it is still momentarily blocked by the HELPER unit). It would allow the removal of the shroud map trigger, but not the EVA one, so didn't bother to change the tutorial.

Btw even with your method you cannot 100% emulate Short Game. Normally in a Short Game if you only have the con.yard left and undeploy it, you wouldn't lose as long as you have the MCV unit alive. Since BaseUnit won't accept more than 1 value without hacking the EXE, this problem can never be fixed without a hack.
_________________

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


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Mon Mar 31, 2014 4:35 pm    Post subject: Reply with quote

Yeah, my method does indeed have the downside that you'll lose the game if you only have an MCV and no buildings left, while Short Game is enabled (it's easy to forget about this and then un-deploy your Construction Yard while having no other structures, which then instantly causes you to lose the game).
I believe your method has the same downside however.

The difference with my method is that it's not necessary to add any triggers to any maps.
_________________

Back to top
View user's profile Send private message Send e-mail MSN Messenger
Iran
Cyborg Specialist


Joined: 23 Mar 2011

PostPosted: Mon Mar 31, 2014 5:05 pm    Post subject: Reply with quote

CCHyper wrote:
Iran wrote:
BaseUnit= is used as if it only takes on value, both reading from RULES.INI and actual uses with for example spawning. It's only used in a few spots so it's not that hard to fix.

BuildConst takes a list and sometimes is broken about it, there's a lot of generated code as internally the BuildConst values are stored in a dynamic array of UnitType IDs. Don't know what's wrong with it but it doesn't take that long to find out. Problem is the way the game code uses the dynamic vector.

It's probably why CCHyper already has those two fixed.


Once I get some free time to bug test the fixes, I will release the fix.

How did fix up BaseUnit=? Did you convert it into a dynamic vector?

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


Joined: 20 Jan 2008
Location: Unknown

PostPosted: Wed Sep 02, 2015 3:24 am    Post subject: Reply with quote

I've mostly gotten this to work with the exception of the player's helper unit which just flails about randomly on the map, which I saw having it in a visible state. Predictably this has no real side effect aside from not having the prompts for low power, etc. I'm no expert in how buildconst works, would I even get those prompts with a suicidal building? Anyhow, the AI seems to auto-deploy the unit anyhow which has had no real issues, just the player.
_________________

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


Joined: 28 May 2013

PostPosted: Wed Sep 02, 2015 6:00 am    Post subject: Reply with quote

The player's helper unit is an invisible shp and it should be included in your mix file. It also self-destructs
for the player, so it shouldn't exist after first few seconds. You could reduce its Strength from 10 to 2, if
there is some delay in self destruct.

Those fake buildings are not suicidal but are Insignificant and InvisibleInGame.

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


Joined: 20 Jan 2008
Location: Unknown

PostPosted: Wed Sep 02, 2015 7:36 am    Post subject: Reply with quote

I made it visible for testing purposes. As per my problem, the unit isn't being destroyed at all, it just endlessly roams the map.

I meant to point out though that deploying the unit into a building with a weapon seems better than outright destroying it since you need it to fire off anyways if you loose the power and funds prompts.
_________________

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


Joined: 28 May 2013

PostPosted: Wed Sep 02, 2015 7:51 am    Post subject: Reply with quote

Try increasing the damage of the suicide anim in art.

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


Joined: 20 Jan 2008
Location: Unknown

PostPosted: Wed Sep 02, 2015 7:56 am    Post subject: Reply with quote

I increased it's strength 10 times and reduced the strength of the helper to 2. I just don't think it's firing.
_________________

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


Joined: 28 May 2013

PostPosted: Wed Sep 02, 2015 8:04 am    Post subject: Reply with quote

Have you done exactly like mentioned in the first post and its attachment? Even the game.exe edits?
It works for me.

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


Joined: 20 Jan 2008
Location: Unknown

PostPosted: Wed Sep 02, 2015 8:16 am    Post subject: Reply with quote

To the best of my knowledge, I even copy/pasted code to try to fix it. Are you using the TS Client? (I doubt it makes a difference but who knows.)

Here are my rules/art I'm using. I am using MCV as the dummy unit, with rangedsuicide/rangedsuicide2/rangedsuicidepr as the weapons and projectiles, and bconst and bconst2 as the structures. I'm adding in 2 factions instead of just 1 (the Forgotten & CABAL, pretty unoriginal but I intend to be changing and playing the campaign mainly).


rules.ini
 Description:

Download
 Filename:  rules.ini
 Filesize:  291.33 KB
 Downloaded:  6 Time(s)


art.ini
 Description:

Download
 Filename:  art.ini
 Filesize:  96.93 KB
 Downloaded:  3 Time(s)


_________________

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


Joined: 28 May 2013

PostPosted: Wed Sep 02, 2015 9:17 am    Post subject: Reply with quote

You have used DeployToFire=yes twice in [MCV], remove both of them as the vehicle is supposed to
self destruct and the building it deploys into doesn't even have a weapon.

Also declare SUICIDE in [Animations]. I haven't checked rest of the INI, first test with these 2 changes.

Once you get it working, then take a backup and try variations if you want.

For me, it works in both in vanilla mod and TS Client with sidebars in both.

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


Joined: 20 Jan 2008
Location: Unknown

PostPosted: Wed Sep 02, 2015 7:53 pm    Post subject: Reply with quote

Thanks a ton for pointing that out, it's working now, somehow all my modding problems usually boil down to missing an ini tag that should or shouldn't be there. My sidebars are still junk but I need to really go over how the hack works in specific because all I did was copy all the side specific mixes for the new sides and changed the side definitions to how they are in those rules.
_________________

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 2 of 2 [71 Posts] Goto page: Previous 1, 2
View previous topic :: View next topic
 Forum index » Modding Central » Tiberian Sun Editing Forum » Tutorials Factory
Jump to:  
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

Wildcard SSL Certificates
[ Time: 0.1536s ][ Queries: 13 (0.0230s) ][ Debug on ]