KarlBar99 KarlBar99

General Modding Questions Thread (All Welcome)

General Modding Questions Thread (All Welcome)

Whilst i'm creating this for my own little pet project to ask dumb basic questions in, anyone who has a question and wants it answered should feel free to drop by, the lack of anything like this that i've been able to find, (maybe i'm blind :p), is a bit sad for everyone else who has questions.

 

 

Ok my first really basic question. is there any way to modify an existing entry in an XML file without overwriting the entire file? The readme talks about adding new stuff and Total Conversions fine, but my modified tech tree is going to need to add tech option entries to some existing improvements. Having to completely overwrite the existing improvements file is not ideal, and their may be other examples i need to edit.

 

Does anyone know is ComponentClasDefs.xml is working as far as adding and using entries. I know occasionally some files won't be enabled in some games and this strikes me as the type of file that's most likely to have issues.

80,533 views 118 replies
Reply #76 Top

That's actually the point, i'm getting a crash now with a modified factionshipstyledef file that isn't using any custom shipclassdef entries whatsoever. Here's an example piece of code that is crashing now. It wasn't when i first created it, but after an edit it started crashing and reverting it to this didn't fix anything.

 

<ShipStyleSet>
<InternalName>DreadShipStyleSet</InternalName>
<DisplayName>DreadShipStyleSet_Name</DisplayName>
<Icon>GC3_S_Basic_Ship_Icon.png</Icon>
<DisplaySampleObjGfxConfig>Drengin_Survey_01S.objgfxcfg</DisplaySampleObjGfxConfig>
<ShipStyle>Drengin</ShipStyle>
<PartsStyle>Drengin</PartsStyle>
<StartingShipyard>BasicShipyard</StartingShipyard><InitialAssaultFighter>DrenginAssaultFighter</InitialAssaultFighter>

<InitialAssaultFighter>DrenginAssaultFighter</InitialAssaultFighter>
<InitialInterceptorFighter>DrenginDroneInterceptor</InitialInterceptorFighter>
<InitialEscortFighter>DrenginAssaultFighter</InitialEscortFighter>
<InitialGuardianFighter>DrenginGuardianFighter</InitialGuardianFighter>

<ShipClass>DrenginStartingScout</ShipClass>
<ShipClass>DrenginStartingSurvey</ShipClass>
<ShipClass>DrenginStartingColony</ShipClass>
<ShipClass>ProtoTypeDrenginScout</ShipClass>
<ShipClass>DrenginScout</ShipClass>
<ShipClass>DrenginSniper</ShipClass>
<ShipClass>DrenginKnight</ShipClass>
<ShipClass>ProtoTypeDrenginSurvey</ShipClass>
<ShipClass>DrenginExplorer</ShipClass>
<ShipClass>DrenginCutter</ShipClass>
<ShipClass>DrenginCutterL</ShipClass>
<ShipClass>DrenginFury</ShipClass>
<ShipClass>DrenginSurvey</ShipClass>
<ShipClass>DrenginCorvette</ShipClass>
<ShipClass>DrenginCorvetteL</ShipClass>
<ShipClass>DrenginCorvetteP</ShipClass>
<ShipClass>DrenginPaladin</ShipClass>
<ShipClass>DrenginCruiser</ShipClass>
<ShipClass>DrenginCruiserL</ShipClass>
<ShipClass>DrenginCruiserP</ShipClass>
<ShipClass>DrenginCruiserD</ShipClass>
<ShipClass>DrenginOverlord</ShipClass>
<ShipClass>DrenginAvatar</ShipClass>
<ShipClass>DrenginAvatarL</ShipClass>
<ShipClass>DrenginAvatarP</ShipClass>
<ShipClass>DrenginAvatarD</ShipClass>
<ShipClass>DrenginTitan</ShipClass>
<ShipClass>DrenginColony</ShipClass>
<ShipClass>DrenginConstructor</ShipClass>
<ShipClass>DrenginTransport</ShipClass>
<ShipClass>DrenginFreighter</ShipClass>
<ShipClass>DrenginBeamSupport</ShipClass>
<ShipClass>DrenginDroneInterceptor</ShipClass>
<ShipClass>DrenginGuardianFighter</ShipClass>
<ShipClass>DrenginAssaultFighter</ShipClass>
<ShipClass>DrenginTacticalSupport</ShipClass>
<ShipClass>AIDefenseDrenginSniper</ShipClass>
<ShipClass>AIDefenseDrenginKnight</ShipClass>
<ShipClass>DrenginBasicConstructor</ShipClass>
<ShipClass>AwardDrenginScout</ShipClass>
<ShipClass>AwardDrenginCutter</ShipClass>
<ShipClass>AwardDrenginDefender</ShipClass>
<ShipClass>AwardDrenginGunboat</ShipClass>
<ShipClass>AwardDrenginSurvey</ShipClass>
<ShipClass>AwardDrenginFrigate</ShipClass>
<ShipClass>AwardDrenginOverlord</ShipClass>
<ShipClass>AwardDrenginColony</ShipClass>
<ShipClass>AwardDrenginConstructor</ShipClass>
<ShipClass>AwardDrenginFreighter</ShipClass>
<ShipClass>AwardDrenginTransport</ShipClass>

<ShipyardArtDefine>
<ObjectGfxConfig>Drengin_Shipyard_01.objgfxcfg</ObjectGfxConfig>
<ThumbnailOverride>Drengin_Shipyard_01.PNG</ThumbnailOverride>
</ShipyardArtDefine>

<StarbaseArtDefine>
<ModuleType>Generic</ModuleType>
<ObjectGfxConfig>Drengin_Level_01.objgfxcfg</ObjectGfxConfig>
<ThumbnailOverride>Drengin_Level_01.png</ThumbnailOverride>
<StrategicIcon>Starbase</StrategicIcon>
</StarbaseArtDefine>

<StarbaseArtDefine>
<ModuleType>Culture</ModuleType>
<ObjectGfxConfig>Drengin_Culture_Level_01.objgfxcfg</ObjectGfxConfig>
<ThumbnailOverride>Drengin_Culture_Level_01.png</ThumbnailOverride>
<StrategicIcon>Culturebase</StrategicIcon>
</StarbaseArtDefine>
<StarbaseArtDefine>
<ModuleType>Culture</ModuleType>
<ObjectGfxConfig>Drengin_Culture_Level_02.objgfxcfg</ObjectGfxConfig>
<ThumbnailOverride>Drengin_Culture_Level_02.png</ThumbnailOverride>
<StrategicIcon>Culturebase</StrategicIcon>
</StarbaseArtDefine>
<StarbaseArtDefine>
<ModuleType>Culture</ModuleType>
<ObjectGfxConfig>Drengin_Culture_Level_03.objgfxcfg</ObjectGfxConfig>
<ThumbnailOverride>Drengin_Culture_Level_03.png</ThumbnailOverride>
<StrategicIcon>Culturebase</StrategicIcon>
</StarbaseArtDefine>
<StarbaseArtDefine>
<ModuleType>Culture</ModuleType>
<ObjectGfxConfig>Drengin_Culture_Level_04.objgfxcfg</ObjectGfxConfig>
<ThumbnailOverride>Drengin_Culture_Level_04.png</ThumbnailOverride>
<StrategicIcon>Culturebase</StrategicIcon>
</StarbaseArtDefine>
<StarbaseArtDefine>
<ModuleType>Culture</ModuleType>
<ObjectGfxConfig>Drengin_Culture_Level_05.objgfxcfg</ObjectGfxConfig>
<ThumbnailOverride>Drengin_Culture_Level_05.png</ThumbnailOverride>
<StrategicIcon>Culturebase</StrategicIcon>
</StarbaseArtDefine>

<StarbaseArtDefine>
<ModuleType>Economic</ModuleType>
<ObjectGfxConfig>Drengin_Economic_Level_01.objgfxcfg</ObjectGfxConfig>
<ThumbnailOverride>Drengin_Economic_Level_01.png</ThumbnailOverride>
<StrategicIcon>Economicbase</StrategicIcon>
</StarbaseArtDefine>
<StarbaseArtDefine>
<ModuleType>Economic</ModuleType>
<ObjectGfxConfig>Drengin_Economic_Level_02.objgfxcfg</ObjectGfxConfig>
<ThumbnailOverride>Drengin_Economic_Level_02.png</ThumbnailOverride>
<StrategicIcon>Economicbase</StrategicIcon>
</StarbaseArtDefine>
<StarbaseArtDefine>
<ModuleType>Economic</ModuleType>
<ObjectGfxConfig>Drengin_Economic_Level_03.objgfxcfg</ObjectGfxConfig>
<ThumbnailOverride>Drengin_Economic_Level_03.png</ThumbnailOverride>
<StrategicIcon>Economicbase</StrategicIcon>
</StarbaseArtDefine>
<StarbaseArtDefine>
<ModuleType>Economic</ModuleType>
<ObjectGfxConfig>Drengin_Economic_Level_04.objgfxcfg</ObjectGfxConfig>
<ThumbnailOverride>Drengin_Economic_Level_04.png</ThumbnailOverride>
<StrategicIcon>Economicbase</StrategicIcon>
</StarbaseArtDefine>
<StarbaseArtDefine>
<ModuleType>Economic</ModuleType>
<ObjectGfxConfig>Drengin_Economic_Level_05.objgfxcfg</ObjectGfxConfig>
<ThumbnailOverride>Drengin_Economic_Level_05.png</ThumbnailOverride>
<StrategicIcon>Economicbase</StrategicIcon>
</StarbaseArtDefine>

<StarbaseArtDefine>
<ModuleType>Military</ModuleType>
<ObjectGfxConfig>Drengin_Military_Level_01.objgfxcfg</ObjectGfxConfig>
<ThumbnailOverride>Drengin_Military_Level_01.png</ThumbnailOverride>
<StrategicIcon>Militarybase</StrategicIcon>
</StarbaseArtDefine>
<StarbaseArtDefine>
<ModuleType>Military</ModuleType>
<ObjectGfxConfig>Drengin_Military_Level_02.objgfxcfg</ObjectGfxConfig>
<ThumbnailOverride>Drengin_Military_Level_02.png</ThumbnailOverride>
<StrategicIcon>Militarybase</StrategicIcon>
</StarbaseArtDefine>
<StarbaseArtDefine>
<ModuleType>Military</ModuleType>
<ObjectGfxConfig>Drengin_Military_Level_03.objgfxcfg</ObjectGfxConfig>
<ThumbnailOverride>Drengin_Military_Level_03.png</ThumbnailOverride>
<StrategicIcon>Militarybase</StrategicIcon>
</StarbaseArtDefine>
<StarbaseArtDefine>
<ModuleType>Military</ModuleType>
<ObjectGfxConfig>Drengin_Military_Level_04.objgfxcfg</ObjectGfxConfig>
<ThumbnailOverride>Drengin_Military_Level_04.png</ThumbnailOverride>
<StrategicIcon>Militarybase</StrategicIcon>
</StarbaseArtDefine>
<StarbaseArtDefine>
<ModuleType>Military</ModuleType>
<ObjectGfxConfig>Drengin_Military_Level_05.objgfxcfg</ObjectGfxConfig>
<ThumbnailOverride>Drengin_Military_Level_05.png</ThumbnailOverride>
<StrategicIcon>Militarybase</StrategicIcon>
</StarbaseArtDefine>

<StarbaseArtDefine>
<ModuleType>Mining</ModuleType>
<ObjectGfxConfig>Drengin_Mining_Level_01.objgfxcfg</ObjectGfxConfig>
<ThumbnailOverride>Drengin_Mining_Level_01.png</ThumbnailOverride>
<StrategicIcon>Miningbase</StrategicIcon>
</StarbaseArtDefine>
<StarbaseArtDefine>
<ModuleType>Mining</ModuleType>
<ObjectGfxConfig>Drengin_Mining_Level_02.objgfxcfg</ObjectGfxConfig>
<ThumbnailOverride>Drengin_Mining_Level_02.png</ThumbnailOverride>
<StrategicIcon>Miningbase</StrategicIcon>
</StarbaseArtDefine>
<StarbaseArtDefine>
<ModuleType>Mining</ModuleType>
<ObjectGfxConfig>Drengin_Mining_Level_03.objgfxcfg</ObjectGfxConfig>
<ThumbnailOverride>Drengin_Mining_Level_03.png</ThumbnailOverride>
<StrategicIcon>Miningbase</StrategicIcon>
</StarbaseArtDefine>
<StarbaseArtDefine>
<ModuleType>Mining</ModuleType>
<ObjectGfxConfig>Drengin_Mining_Level_04.objgfxcfg</ObjectGfxConfig>
<ThumbnailOverride>Drengin_Mining_Level_04.png</ThumbnailOverride>
<StrategicIcon>Miningbase</StrategicIcon>
</StarbaseArtDefine>
<StarbaseArtDefine>
<ModuleType>Mining</ModuleType>
<ObjectGfxConfig>Drengin_Mining_Level_05.objgfxcfg</ObjectGfxConfig>
<ThumbnailOverride>Drengin_Mining_Level_05.png</ThumbnailOverride>
<StrategicIcon>Miningbase</StrategicIcon>
</StarbaseArtDefine>

<StarbaseSFXDefine>DRENGIN_STARBASE_AMBIENT</StarbaseSFXDefine>

</ShipStyleSet>

Reply #77 Top

First, before doing anything, validate the game files through Steam. If you're getting inconsistent crashes, as you indicated in the other thread, then it's probably not your changes causing the problem. I often need to validate 3-4 times a week; I suspect the mod folder might cause some issues with the underlying game. 

Adding ship styles is proven to work, so either you've done something wrong (including potential unknowns like over-length strings), or the game itself has become damaged. The unpredictable crashing suggests the latter.

Reply #78 Top

@Karl: you have 2 entries: <InitialAssaultFighter>DrenginAssaultFighter</InitialAssaultFighter>

 

dont see anything else

Quoting KarlBar99, reply 76

[...]

<StartingShipyard>BasicShipyard</StartingShipyard><InitialAssaultFighter>DrenginAssaultFighter</InitialAssaultFighter>

<InitialAssaultFighter>DrenginAssaultFighter</InitialAssaultFighter>
<InitialInterceptorFighter>DrenginDroneInterceptor</InitialInterceptorFighter>
<InitialEscortFighter>DrenginAssaultFighter</InitialEscortFighter>
<InitialGuardianFighter>DrenginGuardianFighter</InitialGuardianFighter>
[...]

Reply #79 Top

@Mortili that duplication is a copy paste error to the forums and i absent from the actual file.

 

@Naselus: I'll try that but since i can have a crash inducing version of the file in place and can avoid actual crashes by just not using the new style on any races i don't see it as a likely explanation.

Reply #80 Top

 

Hey. I'm looking for some helps starting out modding; this looks a lot more complicated (and hopefuly versatile) than the GCII modding options were. Anyway. I'm hoping to give the weapons in game some more differentiation, with the hope of making the choice of laser, missile, or kinetics actually matter (more). To do that, there are several things I'd like to do, and I was hoping someone could tell me how, or if, they can be done.

EDIT; I was going to include a copy of the stats for a weapon in case anyone wanted to show rather than tell, but I couldn't figure out how to make it collapsible, and didn't want to make an eyesore with a loooong post.
 

Basically, I want to make weapons scale with the size of the ship they are mounted on, and also the target ship, with stats besides size (which was the only thing that scaled with hull size in GCII).

1: I want to make kinetic weapons increase heavily in size, but also in damage, with hull size. Instead of slapping dozens of the same tiny little gun on a big ship, larger hulls would mount larger guns. Say currently a weapon takes up 5 space and does 2 damage on tiny, and 8 space and 2 damage on huge; I'd like to make it take up 20-30 space and do 6-8 damage on a huge hull instead.

2: Scale damage with target hull size. I want to make missiles serve as the primary means for tiny and small hulls to damage big ones. To this end, I want to give missiles a small damage boost against medium and larger hulls (10%, or maybe nerf reload and increase weight until a +1 flat damage boost is reasonable)

3: Scale accuracy with target hull size. In the same fashion, I want to make kinetics hard to use against small, fast targets. Tiny and small ships would use smaller weapons to 'dogfight' but I want the big kinetics on medium and larger hulls to suffer an accuracy penalty against smaller hulls. In addition, missiles will have bonus accuracy against larger targets (with a compensatory nerf to base accuracy, most likely)

I'd also like to try and give medium and larger hulls a little bit of flat DR, something like DMG-1(min 1), to help them tank pinprick damage.

Lastly, and separately, I'd like to know if anyone knows how to mess around with targeting priorities; I think it would be neat to set up some kind of AA weapons or modules to edit how existing weapons work. Basically, imaging using some heavy kinetics as your "ship-killers", but with some smaller, faster lasers also equiped set to target light fighters and escorts. You'd need to be able to set a ship to target different ships with different weapons, basically.

Reply #81 Top

Karl if its crashing when including a style but not otherwise then its not the FactionShipStyleDefs.xml its a problem with something in your ShipClassDefs.xml

Reply #82 Top

@Deathwynd: Except there's no custom ShipClassDefs entries specified, they're all copies of the dregin's own entries, anyway off to try Nasules fix now, (went straight to bed).

Reply #83 Top

So no luck whatsoever, i even tried cutting the file down to just the new style and running it as an edit and it still crashes like crazy.

 

Here's the whole mod including buggy file for you to look at. You may need to make some minor edits after testing it the first time to get the crash, like i said i've had previously functioning styles crap out when tested as a revision of a crashing edit.

 

Here's my test faction in case that helps any, (can't see how but w/e).

 

I recommend messing with the following bit of code, changing all entries to point to drone interceptor for example):

 

<InitialAssaultFighter>DrenginAssaultFighter</InitialAssaultFighter>
<InitialInterceptorFighter>DrenginDroneInterceptor</InitialInterceptorFighter>
<InitialEscortFighter>DrenginAssaultFighter</InitialEscortFighter>
<InitialGuardianFighter>DrenginGuardianFighter</InitialGuardianFighter>

Reply #84 Top

Instead of slapping dozens of the same tiny little gun on a big ship, larger hulls would mount larger guns.

I'm not sure it's possible to make bonuses target hull sizes but about making bigger variants of the weapons: It would, of course, be quite cumbersome to have many variants of each weapon (not to mention the modding work...) but I wonder if it would be doable as an "enhancer component" similar to, for example, the missile assister where the same component works with all missile types.

You could have new ship components like "large mount" and "spinal mount". You'd probably need one set for each weapon type (beam, kinetic, missile) because the effect types seem to be per weapon type and in any way the tech tree setup almost requires that the weapon types are separate.

These new mount components would not be weapons as such but would instead give a hefty bonus to the damage of the actual weapons. Having the combo "large mount" + "laser" would thus represent a big laser cannon. This way you'd only need to create a few new ship components. To make it a true alternative to just stacking lots of standard weapons in your ship the mount component should offer some trade off. For example, it could make the recharge/reload times worse and have a big mass cost and a maybe bigger maintenance but it would then offer a slightly more powerful "damage per time unit". Or some other suitable trade off depending on your intent.

Reply #85 Top

So decided to put my dreadlords project on one side till i figure out what odd incompatibility is producing my factions issue. Started another race mod idea i've had for a few weeks. Not really having major issues but because of some things i'm kinda having to do with the descriptions i'm having issues getting the tech descriptions to fit, (you know the thing that pops up when you go to the tech screen after finishing a research), just wanted to check that there's absolutely no way to make that text group scrollable? I'm pretty sure the answer is a firm and unequivocal no, but want to be sure as it's creating issues.

Reply #86 Top

Some items are scrollable, such as the abilities and traits windows, if they overflow then they can be scrolled, its slow scrolling and there is no indicator that the window has extra contents but it works.  The only suggestion I can make is if it overflows check to see if mousing over and using the scroll wheel works.

Reply #87 Top

Cheers i'll try that. Hope it works as it's kinda necessary in a lot of cases with my new descriptions to get wordy.

 

P.s. i know i've kinda moved onto a new project but i take it no one could reproduce and/or figure out the cause of my issues with the factionshistyles file?

Reply #88 Top

Nope I tried it, tbh I spent several hours trying to solve the problem and got exactly nowhere as I couldn't reproduce it that's why I never replied since I couldnt provide any constructive help.

Reply #89 Top

Also couldn't reproduce it here. I'm still betting the crash was coming in from somewhere else.

Reply #90 Top

No worries. Thanks for spending all that time though looking :). At least knowing the dammed files where working for you is something i guess.

Reply #91 Top

Ok i figured out the scrolling thingy eventually. After you finish entering your to be displayed text, tap enter twice and hit the full stop key. Anything on a new line is treated as a new paragraph, (which seems to enable scrolling), and the spacing is determined by the number of lines of gap, but the bottom half of the last line is allways cut off. This way the only thing on that line is an extraneous full stop which is covered up.

 

Still debating if i'm going to risk releasing this one though.

Reply #92 Top

Hmm, got a question. I know the AI evaluates the value, fortitude and treat stats of it's warships, but is there any code detailing exactly how it prioritises these? I'm in the process of putting together a ship component re-balance mod. But don't want to break the AI. So could do with some more info on how the AI evaluates such things. I've found a few entries at the start of the AI defs file that might be related but i'm wondering if anyone's found anything else i missed.

Reply #93 Top

They're just used in determining the ship role.The exact formula for it is on the wiki under 'roles', IIRC.

Reply #94 Top

I've been toying with the idea of expanding the Mass Effect races mod into more of a total conversion by adding a custom scenario which roughly approximates the lore and storyline of that series. Before I dig too deep though, I'm wondering if my ideas are even plausible.

The following is my features wish list. I don't need an in-depth tutorial for how to do these or anything, mostly just need to know if they might be possible. Though a nudge in the right direction would be nice. :) (Mass Effect spoilers below!)

1. Custom Map / Scenario / Scripted Events
Could I, for example, modify the existing Milky Way scenario to replace the vanilla races with the Mass Effect races starting in lore-appropriate parts of the map? Can I add scripted events, like the Reaper invasion? (If you're unfamiliar, basically I would need a custom pirate-like race to spawn at the edge of the map at a certain turn/date, and begin trying to exterminate all races in the game.)

2. Mass Relay Network
This would be part of the map, but I'm not sure if the mechanic is possible. It's your basic stargate/wormhole/teleportation network. Fleet enters a certain tile, maybe you get a dialog box confirmation, and then the fleet is teleported to another (predetermined) tile elsewhere on the map, to make long-distance space travel faster. Kind of like the wormhole anomalies in vanilla, but static, reusable, and predictable. (I'd need to nerf the ship drives tech tree to balance it out, but that's beside the point.)

3. The Citadel Council to replace U.P.
As I understand it, currently the United Planets is activated when one race discovers all the other races in the galaxy, and all races have automatic membership with a proportional vote. I'd like to modify it thusly, to resemble the Citadel Council in Mass Effect:

  • The Citadel is a fixed location on the map, always politically neutral
  • The Citadel Council is activated when three races discover the Citadel
  • The first three races to discover the Citadel make up the Council, and have an equal vote (33.3%) regardless of power
  • New races to discover the Citadel must petition for membership in the Council; Council members vote to approve or deny membership
  • Non-Council races may observe Council proceedings and are bound by Council resolutions, but cannot vote (could just set their vote to 0% for the sake of simplicity)

#3 seems the most iffy, but I really have no idea. Thanks in advance for the help!

Reply #95 Top

replace the vanilla races with the Mass Effect races starting in lore-appropriate parts of the map?

The home-worlds are assigned so that the order of planet creation in the map editor matches the order of civilizations in the opponents list in the game start. Place these accordingly and you'll get correct starting positions.

custom pirate-like race to spawn at the edge of the map at a certain turn/date, and begin trying to exterminate all races in the game.

Spawn on turn X should be doable. For the second part you'd need "OnConquerPlanet" event triggering actions that duplicate the player command "destroy planet", or that change the planet classification downwards, or that at least destroy the improvements. Though, just destroying the improvements is recoverable so probably not in the spirit of the elimination you want. I don't know whether you can apply the action "DestroyObject" to planets. Try and see what happens... If these are not possible then one work around comes to mind: Give them one improvement only in addition to the capitals. This unique improvement would increase the planetary defense strength to a level that makes it invulnerable to others. Essentially such a planet would then be out of the game and as good as wrecked beyond repair. Add a description to match that result and it sort-of-works. The AI will build it because it's the only available option for it. You could even make the build take a few turns so that you can rescue the planet before the terrible doom machine has done it's job...

It's your basic stargate/wormhole/teleportation network

I don't think you can use the wormholes to that effect but would "space lanes" work as a substitute? If you changed the graphics of the dust clouds to resemble normal black space, and changed normal space graphics to include some visible mark, like a white dot or something in the middle of the hex, you could then create a map where the "space" is actually dust clouds and the connections between the systems are normal space. The visual result should be a normal looking space map but with connecting dot lines between the systems. If you then make the movement penalty of dust clouds big enough then it would always be faster to travel along the space lanes which would simulate the relay network. The AI already calculates its movement paths so that it minimizes the travel time so should work with the AI, too. No idea whether this will slow down or speed up the path calculations, though.

Reply #96 Top

1. Can be fudged, ish. 2 can't be done (wormhole endpoints aren't fixed and I don't think there's any way to do so using just xml), and the majority of 3 probably also can't be done (the whole membership petition thing is likely impossible).

Reply #97 Top

Going back a couple pages, I figured out the minimum you need to do to add new ship blueprints without replacing the existing ones:

- Create an append file that contains just your new ship blueprints (e.g. Mod_ShipBlueprintDefs.xml). Refer to ShipBlueprintDefs.xml for examples. The blueprints in this file must have new unique InternalNames. Otherwise setup the component lists as you wish. Because the file is additional to the actual ShipBlueprintDefs.xml you don't have to worry about keeping it in sync with the core version. The file goes to the mod subfolder "Game".

- Create an append file that contains just your new ship classes (e.g. Mod_ShipClassDefs.xml). Refer to ShipClassDefs.xml for examples. The classes in this file must have unique InternalNames. Also use new unique label ids as values for DisplayName and Description. For the other ship class attributes: Set the value of BlueprintDef to point to one of your new ship blueprints. Several classes can share the same blueprint. If you are happy with core game graphics set ThumbnailOverride, ShipDesign, and StrategicIcon to same values as in some similar ship class you want to borrow for your own. Set ShipHullType and ShipRule to your liking. Set AIShipClass to the same value as in some core ship that you think is the most similar to your ship in how it ought to be used. This way the AI shouldn't go too badly wrong with it. Again, because this file is additional to the actual ShipClassDefs.xml you don't have to worry about keeping it in sync. The file goes to the mod subfolder "Game".

- Create an append file that contains the texts (name and description) of you new ship classes (e.g. Mod_ShipClassText.xml). Refer to ShipClassText.xml for examples. The texts in this file must have unique Labels. Put into the String element the names and descriptions you want although you may run into problems if the texts are too long. Again, additional file to ShipClassText.xml so no sync issues. The file goes to the mod subfolder "Text".

- Modify by replacement the FactionShipStyleDefs.xml by adding your new ship classes at the end of the ship class list in each faction. You don't have to remove anything from the file or change anything in it. Just add your new ship classes. This should make it easier to keep it in sync with possible updates from SD. If you want your ships to have a faction dependent look you need different ship classes for each faction even if they used the same ship blue print. This is because the ship graphics to use is defined in ShipClassDefs.xml. If you don't want your new ships to be available to all factions you don't have to add them to all i.e. at minimum you can add them to just that faction you wish to play and it works fine and then the AI definitely won't get any problems as it won't even try to build them.

Minimum mod is thus:

Mods\ImprovedBlueprints\Game\FactionShipStyleSetDefs.xml
Mods\ImprovedBlueprints\Game\Mod_ShipBlueprintDefs.xml
Mods\ImprovedBlueprints\Game\Mod_ShipClassDefs.xml
Mods\ImprovedBlueprints\Text\Mod_ShipClassText.xml

Well, technically you could omit ShipClassTexts, too, by using the same names and descriptions as the existing core ship classes but where's the fun in that? :)

The reference links between files related to ship blueprints are:

ShipClassDefs.BlueprintDef (n)--->(1) ShipBlueprintDefs.InternalName
ShipClassDefs.DisplayName (n)--->(1) ShipClassText.Label
ShipClassDefs.Description (n)--->(1) ShipClassText.Label
ShipDefs.InternalName (1)--->(1) ShipClassDefs.InternalName
FactionShipStyleSetDefs.ShipClass (1)--->(1) ShipClassDefs.InternalName

These need to be correct and must not get broken. The left item can be missing although then it, of course, will never refer the added items. The right item must exist if the corresponding left item refers to it.

Reply #98 Top

@Petri: Given deathwynd downloaded my files and confirmed that they worked without crashes for him it's clearly not a reference error. But still handy info for anyone else who comes along :).

Reply #99 Top

Is this a bug or as-designed? Surely it must be a bug?

I have a ShipBlueprint:

  <ShipBlueprint>

    <InternalName>LACMissileXBlueprint</InternalName>
    <ShipHullType>Tiny</ShipHullType>
    <Role>Interceptor</Role>
    <RequiredComponentType>MissileWeaponEnhanced</RequiredComponentType>
    <RequiredComponentType>InterstellarDrive</RequiredComponentType>
    <ComponentType>MissileAugment1</ComponentType>
    <FillerComponentType>MissileWeapon</FillerComponentType>
  </ShipBlueprint>


I had Interstellar Travel and researched Weapons System and the ship class using the above blueprint appears. However, the ship contains just the Prototype Antimatter Missile and nothing more. No drive. The miniaturization+capacity is at this moment such that Tiny hull has a size of 27, Hyperdrive Plus is size 12, and the antimatter missile is 18. Quite clearly they don't both fit into the Tiny hull as 12+18=30 so why did the ship appear? That "doesn't fit" probably explains the missing drive but why did the ship appear at this point at all? Both the missile and the drive are set as RequiredComponentType so shouldn't the automatic designer skip it at this point?

Reply #100 Top

There's a separate tag for 'mustfitallrequiredcomponents'. You can find it on the fighter BPs. Try adding it and see if it still appears.

+1 Loading…