.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Space Empires: IV & V (http://forum.shrapnelgames.com/forumdisplay.php?f=20)
-   -   Modding Questions (especially need help for AI) (http://forum.shrapnelgames.com/showthread.php?t=8131)

LostCommander December 28th, 2002 10:32 PM

Modding Questions (especially need help for AI)
 
First off, thank you very much everyone for their 2 cents in the other modding threads and on my previous questions. Now on to the questions http://forum.shrapnelgames.com/images/icons/icon7.gif

Where in the component enhancement file should tech pre-reqs be placed? (or is this not enabled, saw differing opinions in previous threads)

Do seeker weapon missile mounts work? I have tried and it seems to DISPLAY the change (and the size and dmg cap are changed), but damage and range seem to be unaffected in practice...

How can you give a single weapon a combat to-hit bonus without affecting all the weapons on the ship?

Is there any way to EXCLUDE a single weapon/component from a weapon mount? (without simply adding ALL the others to the comp family specifications)

Is there a simple way to tell when and in which direction the program will round a number?

How can one edit the AIs to comply with a new mod?

How can one set a limit on the number of a component that can be used in a design?

What is a good way to test a mod?

How much do troops affect a populace's happiness, can this be modified, if so then how/where, and how can you tell that it does (other than watching the 400+ troops you just dropped on the rioting planet make it jubliant the next month)?

[edit(s) - more questions]

[ December 29, 2002, 06:30: Message edited by: LostCommander ]

DavidG December 29th, 2002 05:40 AM

Re: Modding Questions (especially need help for AI)
 
Quote:

Originally posted by LostCommander:

Is there a simple way to tell when and in which direction the program will round a number?


<font size="2" face="Verdana, Helvetica, sans-serif">Good question. The one area I have noticed this it was rounded down. The case was when I picked a 90% repair trait for my Race in a P&N game. I forget which but a component that normally repaired ONE component per turn was now repairing 0. So in this case things were rounded down.

Desdinova December 29th, 2002 09:09 AM

Re: Modding Questions (especially need help for AI)
 
Quote:

Originally posted by LostCommander:
How can one set a limit on the number of a component that can be used in a design?

<font size="2" face="Verdana, Helvetica, sans-serif">in components.txt there is a line for restrictions. this lets you limit the # of components per ship. it ranges from 0-10 per ship but it has to be spelled out not done in numbers.

capnq December 29th, 2002 11:50 PM

Re: Modding Questions (especially need help for AI)
 
Quote:

How can you give a single weapon a combat to-hit bonus without affecting all the weapons on the ship?
<font size="2" face="Verdana, Helvetica, sans-serif">I think you'd have to design a separate Version of the weapon with the bonus, and add it to Components.txt while leaving the originals in there, too.
Quote:

How can one edit the AIs to comply with a new mod?[...] What is a good way to test a mod?
<font size="2" face="Verdana, Helvetica, sans-serif">Depends on the mod. Mods that don't change any techs or Advanced Traits shouldn't require any changes to the AI. Tech changes may mean rewriting the AIs to use the techs or counter them.

Playing lots of test games is the best way to go, either solo or with volunteer betatesters helping. You can also set up hotseat solo games with more than one empire under your control, if the AIs can't handle the mod.
Quote:

How much do troops affect a populace's happiness, can this be modified, if so then how/where, and how can you tell that it does (other than watching the 400+ troops you just dropped on the rioting planet make it jubliant the next month)?
<font size="2" face="Verdana, Helvetica, sans-serif">This is defined by the race's Happiness type; the numbers are in Data\Happiness.txt . Watching what the troops do is the only way to judge, unfortunately; there's no way to see what the actual Anger number for a planet is.

LostCommander December 30th, 2002 02:42 AM

Re: Modding Questions (especially need help for AI)
 
Capnq, thanks for happiness info! http://forum.shrapnelgames.com/images/icons/icon7.gif For the weapon to-hit bonus, I am making new weapons and just wanted to know which ability it was (for a single weapon emplacement and not necessarily PD). I looked through the abilities file and could not find it. For the AI, my problem is illegal ship designs. I have gone through and crushed all non-conforming weapon family #s from the components, but there are still too many engines. I would like the AI to make the ships as fast as is legally possible, and no faster.

Desdinova, thanks for component restriction info! http://forum.shrapnelgames.com/images/icons/icon7.gif

Rollo December 30th, 2002 04:10 AM

Re: Modding Questions (especially need help for AI)
 
Can you be a bit more specific about the illegal desings? If you post the design and the engine components, some people might be able to help.

Rollo

LostCommander December 30th, 2002 05:57 AM

Re: Modding Questions (especially need help for AI)
 
http://forum.shrapnelgames.com/images/icons/icon7.gif Sure Rollo. The only change in the vehicle size file that the AI has access to is that Escorts and Frigates are allowed 8 engines and Destroyers and Light Cruisers are allowed 7 (as opposed to the original 6 for all lower warships). I am running across AI:

Escorts - command comps (B,LS,CQ), 1 DUC, and 9 regular, everyday Ion Engines.

Frigates - CCs, 2 DUCs, a supply storage, and 9 Ion Engines.

Destroyers - CCs, 4 DUCs, 1 SS, and 13 engines...

DUCs and IEs are completely untouched, ss was given 3K supplies instead of normal 500. I am, well... lost... as to what to do about it.

Graeme Dice December 30th, 2002 07:35 AM

Re: Modding Questions (especially need help for AI)
 
Quote:

Originally posted by LostCommander:
[QB]Capnq, thanks for happiness info! http://forum.shrapnelgames.com/images/icons/icon7.gif For the weapon to-hit bonus, I am making new weapons and just wanted to know which ability it was (for a single weapon emplacement and not necessarily PD). I looked through the abilities file and could not find it.
<font size="2" face="Verdana, Helvetica, sans-serif">To-hit for weapons is controlled by the weapon modifier line of the data file.

LostCommander December 30th, 2002 07:48 AM

Re: Modding Questions (especially need help for AI)
 
Graeme Dice, Thanks! I am not sure why I could not figure that out. Even listed in the SEIV modding 101 page... *shakes head* better get some sleep I suppose.

BTW to anyone, can combat to-hit / to-be-hit modifiers be set to more than 99% / less than -99%?

Rollo December 30th, 2002 11:57 AM

Re: Modding Questions (especially need help for AI)
 
hmm, not sure why you get illegal designs with the changes you mentioned, but i have a suspicion...
what AI causes this? can you paste the design from the ..._AI_DesignCreation file. that would help a great deal to track the problem.

LostCommander December 30th, 2002 05:32 PM

Re: Modding Questions (especially need help for AI)
 
More than one AI is designing these, though some are not. The Sallega are one AI that have produced all three:

Name := Attack Ship
Design Type := Attack Ship
Vehicle Type := Ship
Default Strategy := Optimal Firing Range
Size Minimum Tonnage := 10
Size Maximum Tonnage := 5000
Num Must Have At Least 1 Ability := 1
Must Have Ability 1 := Weapon
Minimum Speed := 4
Desired Speed := 40
Majority Weapon Family Pick 1 := 32
Majority Weapon Family Pick 2 := 9
Majority Weapon Family Pick 3 := 1
Majority Weapon Family Pick 4 := 25
Majority Weapon Family Pick 5 := 0
Secondary Weapon Family Pick 1 := 33
Secondary Weapon Family Pick 2 := 0
Secondary Weapon Family Pick 3 := 0
Secondary Weapon Family Pick 4 := 0
Secondary Weapon Family Pick 5 := 0
Shields Spaces Per One := 200
Armor Spaces Per One := 1200
Majority Comp Spaces Per One := 1200
Majority Comp Ability := Weapon
Secondary Comp Spaces Per One := 500
Secondary Comp Ability := Weapon
Num Misc Abilities := 12
Misc Ability 1 Name := Point-Defense
Misc Ability 1 Spaces Per One := 400
Misc Ability 2 Name := Cloak Level
Misc Ability 2 Spaces Per One := 10000
Misc Ability 3 Name := Quantum Reactor
Misc Ability 3 Spaces Per One := 10000
Misc Ability 4 Name := Combat To Hit Defense Plus
Misc Ability 4 Spaces Per One := 10000
Misc Ability 5 Name := Combat To Hit Offense Plus
Misc Ability 5 Spaces Per One := 10000
Misc Ability 6 Name := Multiplex Tracking
Misc Ability 6 Spaces Per One := 10000
Misc Ability 7 Name := Shield Regeneration
Misc Ability 7 Spaces Per One := 800
Misc Ability 8 Name := Emergency Resupply
Misc Ability 8 Spaces Per One := 800
Misc Ability 9 Name := Self-Destruct
Misc Ability 9 Spaces Per One := 10000
Misc Ability 10 Name := Scanner Jammer
Misc Ability 10 Spaces Per One := 10000
Misc Ability 11 Name := Supply Storage
Misc Ability 11 Spaces Per One := 500
Misc Ability 12 Name := Standard Ship Movement
Misc Ability 12 Spaces Per One := 45

Rollo December 30th, 2002 06:04 PM

Re: Modding Questions (especially need help for AI)
 
ah, I see now. my suspicions were confirmed http://forum.shrapnelgames.com/images/icons/icon7.gif .

these lines causes the design minister to makes illegal designs:

Misc Ability 12 Name := Standard Ship Movement
Misc Ability 12 Spaces Per One := 45

That will cause to 'fill' the design with engines. I assume you got that from a mod with quasi-newtonian-propulsion (QNP) like Proportions or P&N Mod.

I suggest deleting these lines from all designs. Does your mod have QNP also? In that case I would raise the 'Desired speed' to 255. If I recall correctly that will make the designs as fast as possible without making them illegal or causing errors.

Hope that helps,
Rollo

PS: a sidenote... IIRC, 'Minimum Speed' is better understood as 'Minimum number of engines' that are placed in a design. whereas 'Desired Speed' takes into account the standard movement points of the engines used. In the unmodded files all engines provide one standard movement, so speed and number of engines are the same. In some mods engines produce more movement points. For example, desired speed of 40 might give you 8 engines with 5 standard movement.

Hope all is clear now... if not, ask again http://forum.shrapnelgames.com/images/icons/icon12.gif

LostCommander December 30th, 2002 06:35 PM

Re: Modding Questions (especially need help for AI)
 
Ah HA! Much better! Thanks Rollo. Yes I think I probably did get that one from P&N mod.

LostCommander December 30th, 2002 09:11 PM

Re: Modding Questions (especially need help for AI)
 
Also, does anyone know under which circumstances the .emp files need to be remade? Settings change, racial trait change, and data file change...?

Also Also, why do the component family numbers matter (other than for upgrades and component specific mounts)? What is the effect of multiple components with the same family number and roman numeral? What determines where in the component selection screen (when making new designs) a component is placed? If components are moved around in the .txt file, will that affect the AI's ability to utilize them?

[edit: + second paragraph of questions]

[ December 30, 2002, 20:02: Message edited by: LostCommander ]

Captain Kwok December 30th, 2002 09:16 PM

Re: Modding Questions (especially need help for AI)
 
Empire files generally need to be remade after changing racialtraits.txt, cultures.txt, or settings.txt if you've changed the thresholds for different attributes.

LostCommander December 30th, 2002 10:04 PM

Re: Modding Questions (especially need help for AI)
 
Captain Kwok, thanks for .emp file note! This modding stuff is quite complicated, but lots of fun! http://forum.shrapnelgames.com/images/icons/icon10.gif

Fyron December 30th, 2002 11:50 PM

Re: Modding Questions (especially need help for AI)
 
Quote:

Originally posted by LostCommander:
BTW to anyone, can combat to-hit / to-be-hit modifiers be set to more than 99% / less than -99%?
<font size="2" face="Verdana, Helvetica, sans-serif">All modifiers are added up, and the number can be more than 99 or less than -99. The 99 to hit chance is applied after all non-Talisman modifiers are added. You can easily have 140 or more bonus to hit. http://forum.shrapnelgames.com/images/icons/icon7.gif Talismans make it 100% to hit after all modifiers.

capnq December 31st, 2002 12:13 AM

Re: Modding Questions (especially need help for AI)
 
Not sure about your questions about family numbers, but
Quote:

What determines where in the component selection screen (when making new designs) a component is placed? If components are moved around in the .txt file, will that affect the AI's ability to utilize them?
<font size="2" face="Verdana, Helvetica, sans-serif">Components appear on the design screen in the order they're listed in Components.txt . I don't think moving different families around has any effect, but the order of components within the same family may effect which one the AI thinks is the "best" available component.

[ December 30, 2002, 22:14: Message edited by: capnq ]

pathfinder December 31st, 2002 01:48 AM

Re: Modding Questions (especially need help for AI)
 
Rollo: So, B5 is QNP, which means I shouldn't take those standard movement lines out...what value would it be? I dropped it to 10 (from 25) and seem to have gotten rid of the RCEs in B5 due to the "many engines" syndrom; however, now some of the small ships have movements with 1-2 while larger ones have 4-7 (nothing bigger than Light Cruiser researched yet)...warships/attack ships seem to be better off while specialty ships (assult ships, mine layers, troop transports, etc) seem to suffer.

Note: B5 has the attack ships broken down to class (eg destroyer, scout, frigate, escort carrier, assult ship, etc)

wish Val would get off holiday so he'd be getting these headaches http://forum.shrapnelgames.com/images/icons/icon12.gif

[ December 31, 2002, 00:06: Message edited by: pathfinder ]

LostCommander December 31st, 2002 02:11 AM

Re: Modding Questions (especially need help for AI)
 
Thanks Fyron, that was exactly the kind of answer I was looking for! http://forum.shrapnelgames.com/images/icons/icon7.gif capnq, another way I could re-phrase the component family number question could be:

"Would the program snap if I had several components with the same family and, say 0 for the roman numeral? How about if there were duplicate racial tech component entries with the same family number and same roman numerals (say 2 racials and the standard ion engines I-III)? What would it do for the upgrade button when more than one component is better?"

I should also add: What is the difference between the weapon family number and the regular family number for weapon components (other than that the weapon family is used in the AI design creation files)?

Thank you all very much for the information and help. It would be alot easier on this end if I could just test random ideas on this end. Cannot until Jan-5 however... http://forum.shrapnelgames.com/images/icons/icon9.gif

LostCommander December 31st, 2002 10:07 PM

Re: Modding Questions (especially need help for AI)
 
Yet another question... How exactly is the final maintenence value of a vessel determined? Say with the original maintenance set at 50, a 1K resource cost base (-50% maintenance bonus) of a race with a 125 maintenance aptitude is 250 resources in maintenance per turn. If a component is added (base still costs 1K) that reduces maintenence of a vehicle by 10%, when and where is it applied? Would the base's maintenance be 225, 200, or 75 resources per turn in maintenance costs (or something else entirely)?

Thank you very much! http://forum.shrapnelgames.com/images/icons/icon7.gif

Fyron January 2nd, 2003 08:34 PM

Re: Modding Questions (especially need help for AI)
 
Quote:

Originally posted by LostCommander:
Yet another question... How exactly is the final maintenence value of a vessel determined? Say with the original maintenance set at 50, a 1K resource cost base (-50% maintenance bonus) of a race with a 125 maintenance aptitude is 250 resources in maintenance per turn. If a component is added (base still costs 1K) that reduces maintenence of a vehicle by 10%, when and where is it applied? Would the base's maintenance be 225, 200, or 75 resources per turn in maintenance costs (or something else entirely)?

Thank you very much! http://forum.shrapnelgames.com/images/icons/icon7.gif

<font size="2" face="Verdana, Helvetica, sans-serif">The Maintenance Aptitude trait bonus is subtracted from the base 25% value. 120 MA means you pay 5% maintenance for ships. 50 MA means you pay 75% maintenance. Maintenance reduction abilities on vehicles and components are multiplicative instead of additive. Bases get 50% maintenence reduction. So, a base owned by a race with 120 MA pays 2.5% maintenance.

Note: Ships are hard-coded to have a minimum base maintenance cost of 5%. If you take 120 MA and Merchants culture, you still pay 5%, not 0%.

The maintenance trait can be fixed (made multipilicative instead of additive) by making the base maintenance cost be 100 and giving all ships 75% maintenance reductition (and bases get 95 IIRC, check P&N for the exact value). The MA trait should then have its max increased, and cost per % lowered.

Rollo January 3rd, 2003 02:11 AM

Re: Modding Questions (especially need help for AI)
 
Quote:

Originally posted by pathfinder:
Rollo: So, B5 is QNP, which means I shouldn't take those standard movement lines out...what value would it be? I dropped it to 10 (from 25) and seem to have gotten rid of the RCEs in B5 due to the "many engines" syndrom; however, now some of the small ships have movements with 1-2 while larger ones have 4-7 (nothing bigger than Light Cruiser researched yet)...warships/attack ships seem to be better off while specialty ships (assult ships, mine layers, troop transports, etc) seem to suffer.

Note: B5 has the attack ships broken down to class (eg destroyer, scout, frigate, escort carrier, assult ship, etc)

wish Val would get off holiday so he'd be getting these headaches http://forum.shrapnelgames.com/images/icons/icon12.gif

<font size="2" face="Verdana, Helvetica, sans-serif">I don't know enough about the B5 mod to suggest any values. IMHO having a 'standard movement' line in the designs is asking for trouble with the AI, though.
I am willing to help out. Please look and answer into my post in the B5 thread.

Rollo

LostCommander January 5th, 2003 07:18 PM

Re: Modding Questions (especially need help for AI)
 
Thank you very much Fyron and Rollo for info.

Bumping this topic to hopefully get answers to the Last 3 questions:

Where in the component enhancement file should tech pre-reqs be placed? (or is this not enabled, saw differing opinions in previous threads)

Do seeker weapon missile mounts work? I have tried and it seems to DISPLAY the change (and the size and dmg cap are changed), but damage and range seem to be unaffected in practice...

Would the program snap if I had several components with the same family and, say 0 for the roman numeral? How about if there were duplicate racial tech component entries with the same family number and same roman numerals (say 2 racials and the standard ion engines I-III)? What would it do for the upgrade button when more than one component is better?

Thanks very much everybody! http://forum.shrapnelgames.com/images/icons/icon10.gif

[edit: had to add a question]

P.S. is there a limit to the number of engines a ship can have / that max engines can be set at?

[ January 05, 2003, 18:09: Message edited by: LostCommander ]

Fyron January 5th, 2003 09:12 PM

Re: Modding Questions (especially need help for AI)
 
Quote:

Where in the component enhancement file should tech pre-reqs be placed? (or is this not enabled, saw differing opinions in previous threads)
<font size="2" face="Verdana, Helvetica, sans-serif">If you look in the file header, it appears that those lines go at the end. But looking in the latest P&N mod, it seems to work when you place them before Vehicle Type. eg:

</font><blockquote><font size="1" face="Verdana, Helvetica, sans-serif">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">Number of Tech Req := 1
Tech Area Req 1 := Troop Weapons
Tech Level Req 1 := 1
Vehicle Type := Troop</pre><hr /></blockquote><font size="2" face="Verdana, Helvetica, sans-serif">
Quote:

Do seeker weapon missile mounts work? I have tried and it seems to DISPLAY the change (and the size and dmg cap are changed), but damage and range seem to be unaffected in practice...
<font size="2" face="Verdana, Helvetica, sans-serif">No, they do not work.

Quote:

Would the program snap if I had several components with the same family and, say 0 for the roman numeral? How about if there were duplicate racial tech component entries with the same family number and same roman numerals (say 2 racials and the standard ion engines I-III)? What would it do for the upgrade button when more than one component is better?
<font size="2" face="Verdana, Helvetica, sans-serif">Upgrades would replace it with the Last entry in the file of the same family number. The game would not snap. Check the Proportions Mod facilities file. I believe it uses a similar system to what you describe.

Quote:

P.S. is there a limit to the number of engines a ship can have / that max engines can be set at?
<font size="2" face="Verdana, Helvetica, sans-serif">Ships can not have more than 255 move points before engines per move is calculated. In the latest Gold patch, having more move points causes the game to roll over the movement, going back to 1 and starting over. Before, it causes a Range Check Error.

Phoenix-D January 5th, 2003 09:15 PM

Re: Modding Questions (especially need help for AI)
 
"Where in the component enhancement file should tech pre-reqs be placed? (or is this not enabled, saw differing opinions in previous threads)"

Doesn't matter- it can be placed after any other entry. You won't see the mount listed in the results of research entry, and you won't get a log item saying you got it, but it will be there.

"Do seeker weapon missile mounts work? I have tried and it seems to DISPLAY the change (and the size and dmg cap are changed), but damage and range seem to be unaffected in practice.."

Mounts work for seekers- but only the launcher. In other words you can change size, damage resistance, cost, and supply used but not range, damage, seeker damage resistance.

"P.S. is there a limit to the number of engines a ship can have / that max engines can be set at?"

The max Standard Move a ship can have is 255. After that SE4 sets the move to 0 and re-starts the counting. The max a ship can move in a Simultanious game is 30 squares.

Phoenix-D

LostCommander January 5th, 2003 09:38 PM

Re: Modding Questions (especially need help for AI)
 
Thank you all very much! All questions finished. http://forum.shrapnelgames.com/images/icons/icon7.gif


All times are GMT -4. The time now is 02:15 PM.

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