.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Space Empires: IV & V (http://forum.shrapnelgames.com/forumdisplay.php?f=20)
-   -   SE5 - Mod Out LCX as Early Warship (http://forum.shrapnelgames.com/showthread.php?t=30410)

Fyron September 21st, 2006 04:26 PM

SE5 - Mod Out LCX as Early Warship
 
As an example of the flexibility of the SE5 data format, I present to you a way to kill the gamey tactic of using light carriers as warships early on. This could also be used to make non-combatant ships (eg: mining hulls, transports, colony ships) non-combatant by not carrying many weapons, rather than just large to hit penalties that still allow the use of missiles.

First, you must add an ability to every single weapon. AI Tag ## abilities have stuck around, so I will use one of those. The following must be added to every weapon in Components.txt:

====================
Number Of Abilities := 1
Ability 1 Type := AI Tag 01
Ability 1 Description :=
Ability 1 Scope := Space Object
Ability 1 Range Formula := 0
Ability 1 Amount 1 Formula := 0
Ability 1 Amount 2 Formula := 0
====================

You can do this in a flash by extracting the following Python script in your mod's Data folder and running it. It will create a "ComponentsTemp.txt" file with the extra ability appended to all weapons.

add_ability.zip

Next, we need to modify the light carrier hull in VehicleSizes.txt. This is an abbreviated portion of the light carrier entry:

====================
Number Of Requirements := 7
Requirements Evaluation Availability := 1, 2
Requirements Evaluation Allows Placement := 3, 4, 5, 6, 7
Requirements Evaluation Allows Usage := TRUE
Requirement 1 Description := Empire must have at least tech level 1 in Light Hull Construction.
Requirement 1 Formula := Get_Empire_Tech_Level("Light Hull Construction") >= (1 + ([%Level%] - 1))
Requirement 2 Description := Empire must have at least tech level 1 in Fighters.
Requirement 2 Formula := Get_Empire_Tech_Level("Fighters") >= (1 + ([%Level%] - 1))
Requirement 3 Description := This vehicle must have 1 Bridge.
Requirement 3 Formula := (Get_Design_Ability_Component_Count("Control Center") = 1) or (Get_Design_Ability_Component_Count("Master Computer") >= 1)
Requirement 4 Description := This vehicle must have at least Life Support for 100 crew members.
Requirement 4 Formula := (Get_Design_Ability_Total("Life Support", 1) >= 100) or (Get_Design_Ability_Component_Count("Master Computer") >= 1)
Requirement 5 Description := This vehicle must have at least Crew Quarters for 100 crew members.
Requirement 5 Formula := (Get_Design_Ability_Total("Crew Quarters", 1) >= 100) or (Get_Design_Ability_Component_Count("Master Computer") >= 1)
Requirement 6 Description := This vehicle can only have a maximum of 12 movement.
Requirement 6 Formula := Get_Design_Ability_Component_Count("Movement Standard") <= 12
Requirement 7 Description := This vehicle must have at least 50% of its hull dedicated to Fighter Bays.
Requirement 7 Formula := Get_Design_Ability_Percentage_Of_Hull_Space("Units - Launch", "Fighter") >= 50
====================

Take a look at Req 6. This is how max engines are defined now, a limit on the ability. Since we gave all weapons the ability AI Tag 01, we can use a similar limit to limit the number of weapons. You could add this:

====================
Requirement 8 Description := This vehicle can only have a maximum of 3 weapon systems.
Requirement 8 Formula := Get_Design_Ability_Component_Count("AI Tag 01") <= 3
====================

Of course, remember to increase the Num Reqs tag and add 8 to the allows placement, as so:

====================
Number Of Requirements := 8
Requirements Evaluation Availability := 1, 2
Requirements Evaluation Allows Placement := 3, 4, 5, 6, 7, 8
====================

Voila! Now, light carriers can only have 3 weapons!

Alternatively, you could make the limit a percent of the hull space, by making Req 8 be this instead:

====================
Requirement 8 Description := This vehicle can have at most 10% of its hull dedicated to weapon systems.
Requirement 8 Formula := Get_Design_Ability_Percentage_Of_Hull_Space("AI Tag 01", 1) <= 10
====================

Captain Kwok September 21st, 2006 04:40 PM

Re: SE5 - Mod Out LCX as Early Warship
 
It's a little work intensive but it works. If we could just count components that were weapons that would make this so much easier.

For the SE:V Balance Mod, suitable engine requirements make it so that carriers can't be packed with lots of weapons like in stock.

StarShadow September 21st, 2006 04:46 PM

Re: SE5 - Mod Out LCX as Early Warship
 
Wouldn't it be easier to just require the light carrier to devote most of it's space to fighter bays?

Just change:
Requirement 7 Description := This vehicle must have at least 50% of its hull dedicated to Fighter Bays.
Requirement 7 Formula := Get_Design_Ability_Percentage_Of_Hull_Space("Units - Launch", "Fighter") >= 50

To something like:

Requirement 7 Description := This vehicle must have at least 80% of its hull dedicated to Fighter Bays.
Requirement 7 Formula := Get_Design_Ability_Percentage_Of_Hull_Space("Units - Launch", "Fighter") >= 80

Fyron September 21st, 2006 04:50 PM

Re: SE5 - Mod Out LCX as Early Warship
 
A python script could add the ability to all weapons in a flash. http://forum.shrapnelgames.com/images/smilies/wink.gif

===

I did not see a formula for "weapon count," sadly. All I saw was what mounts use:

Requirement 1 Formula := Get_Component_Weapon_Type() = "Direct Fire"

Which is just a bool, not a count. http://forum.shrapnelgames.com/images/smilies/frown.gif

===

Starshadow:
That is possible, yes, but it eliminates other choices too, like the tradeoff between fighter bays vs. cargo bays (store more fighters, or launch more at once?), and defenses (armor/shields) vs. fighter bays.

Captain Kwok September 21st, 2006 04:51 PM

Re: SE5 - Mod Out LCX as Early Warship
 
You could do that - but it wouldn't affect the AI in this case. One change in SE:V due to formulas is that the those requirements are actually "hard-coded" in a couple of the AI scripts, which means you need to edit that and re-compile the AI scripts. Not a big deal, but something to consider.

Fyron September 21st, 2006 04:52 PM

Re: SE5 - Mod Out LCX as Early Warship
 
Actually, such requirements were ignored by AI in SE4 too...

Atrocities September 21st, 2006 05:13 PM

Re: SE5 - Mod Out LCX as Early Warship
 
Why too much work involved.. I just got a headace from looking at it. http://forum.shrapnelgames.com/images/smilies/frown.gif

Phoenix-D September 25th, 2006 04:51 PM

Re: SE5 - Mod Out LCX as Early Warship
 
Quote:

Atrocities said:
Why too much work involved.. I just got a headace from looking at it. http://forum.shrapnelgames.com/images/smilies/frown.gif

However you can't even *do* it in SE4.

In general, the stuff that was easy in SE4 is easy in SE5 (weapon forumlas excepted, but Fyron has a tool for those). Its only when you get to the more advanced stuff that things get..weird.

Fyron September 25th, 2006 07:17 PM

Re: SE5 - Mod Out LCX as Early Warship
 
Eh? It's just making a little script to add the AI Tag ability to weapons, then adding another req to each hull you want to have a weapon limit. It's not much effort at all, really.

Fyron September 25th, 2006 08:40 PM

Re: SE5 - Mod Out LCX as Early Warship
 
1 Attachment(s)
Attached to this post is a Python script that will add the ability "AI Tag 01" to all weapon components.


All times are GMT -4. The time now is 01:50 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.