FMod Posted November 9, 2012 Share Posted November 9, 2012 I'm currently working on a tool that allows players to build custom rulesets by combining sections from different mods, patching in partial rulesets with just the changed lines, applying mini-patches to customize their game, potentially merging mods if someone wants to. You can do it in a text editor yourself, but the mod builder (or however it's named) is meant to be more convenient and newbie-friendly. It also allows for easily customizable mods with options the player can pick at installation. For instance, some players dislike Warspace's weapon changes, this way a user can be prompted to select Vanilla, Warspace, Marathon, Alternative weapon balance sets.It's also likely to include options for language file patches. I'm not going to compete with upk tools, that's the line. Now, I have a few questions requiring your input. The first is really easy, the second is more technical and aimed at modders. 1) How should I name it? Can't seem to get a grasp on a good name. Mod Customizer or Merger, Custom Ruleset Builder, it doesn't qualify as mod manager, but maybe "Ruleset Manager", something else... suggest something! 2) What sections to break the mods down into - what needs to be customizable and what doesn't?In total there's Armors+Characters, Weapons, Difficulties; Stat Progression, Funding+Continent Bonuses; XP thresholds, Tactical Constants+Strategic Constants; Item Costs+Facility Costs+Foundry Projects+OTS Projects, Research. I put "+" for parts I'm currently going to combine together. Semicolons ";" are necessary separations. Too many splits will require more files and more ini file editing (I'll try automating it, but can't be sure), too few splits can miss out on customization.Do you think it's just right, or should I change the division? Also, if you're familiar with ruleset structure, maybe there's even smaller parts of these sections you think need to be separate. Link to comment Share on other sites More sharing options...
Drakous79 Posted November 9, 2012 Share Posted November 9, 2012 (edited) 1) If planned features are merge/customize/patch inis to exe + patch language files, I would name it different than Patcher, Builder. XCOM Manager or XCOM Tool maybe. Or choose the name independent on functions. Kings, Queens or FMod, XMod :) When people get known to the tool and familiar with its functionality, the name serves mostly for communication and promotion purpose. 2) The division seems ok so far. Would be cool to have some description about the mod's features I am about tu turn on/off. I'm imagining a list with headers, tickboxes and description window with some control buttons. Could be possible to include special strings in mod files for the tool: MyMod.Queens[Queens Section="Weapons" Description="All weapons get boosted damage. On top of it, lasers are more precise."] Weapons=(iType=eItem_Pistol,ABILITIES[0]=eAbility_ShotStandard,ABILITIES[1]=eAbility_Overwatch......) [Queens Section="Character" Description="Rookies got more starting will."] Characters=(iType=eChar_Soldier,HP=5,Offense=65,Defense=0,Mobility=12,SightRadius=27,Will=50......)The toughest is to combine 2 mods altering the same line. For soldiers - the first mod HP=15 Will=30 and the second HP=5 Will=80. Either you end up with tough panicking guy or squishy buldozer. And giving people option to choose between conflicting variables - not sure how to address the issue in user friendly manner. Also some balance mods could be kind of unbalanced choosing just some of features, if the author thought in bigger scale. So - what's the release date? :thumbsup: Edited November 9, 2012 by Drakous79 Link to comment Share on other sites More sharing options...
FMod Posted November 10, 2012 Author Share Posted November 10, 2012 Could be possible to include special strings in mod files for the tool:I suppose these lines can be added into the files themselves for patches. For complete mod sections, it's better to use one ini for all. I'm not sure how much cluttering the exe can take - it can definitely take some, but it's probably best not to abuse that. Patches can be cluttered at will, since only lines already present in the exe are applied. For the release date, the key function is not working yet, but it should only take me a few days (if I don't skip any) to have a usable version. It's not exactly a GUI, something better can be made someday, so I try to avoid feature creep and go for speed over perfectionism. The toughest is to combine 2 mods altering the same line. For soldiers - the first mod HP=15 Will=30 and the second HP=5 Will=80. Either you end up with tough panicking guy or squishy buldozer. And giving people option to choose between conflicting variables - not sure how to address the issue in user friendly manner.Merging mods changing one line is pretty much impossible - it can only be done manually, otherwise you're inviting bugs and glitches.Mostly your mod configuration is going to look like this: Rules_Custom.iniArmor=TwoSlots,armor_twoslots.txt,Vanilla stats with two item slots for all Weapon=Alternative,weapon_alt.txt,In between vanilla and Warspace Balance=Zero,balance_zero.txt,No difficulty modifiers Statprog=Turbo,stat_turbo.txt,One level beyond vanilla Colonel Funding=Marathon,funding_marathon.txt,Slowed eng and sci gain XP=Turbo,xp_turbo.txt,One level XP threshold shift ... Patch=Almost Equal,patch_rec2.txt,Narrow rookie stat range with Not Born Equal Patch=Tougher Civilians,patch_civ.txt,Gives civilians 3hp and more defense Patch=Combo Stims,patch_stim.txt,Stims give Heal Wound (requires upk mod)This doesn't have to be edited by hand, each item is selectable in a menu. But options first need to be added to modfiles.ini to have descriptions. Mods can supply their .ini to be semi-automatically added to modfiles.ini. Later there might be an automated option to break a complete ruleset apart and add it into the ini, without descriptions though. On the plus side, mod format is really the same as modpatcher file, with all irrelevant lines removed. Patch format is the same, it can just be one line or multiple. But it's only possible to patch lines with unique option names. There are some lists, for instance UFOAlloys=30 is followed by UFOAlloys=60, for different UFOs. These can't be patched. When you have picked all your options and patches, the utility concatenates armor, weapon, balance and up to research sections into one file, then applies selected patches, then lets you check the file and patch it into the exe. Patches are probably the most useful function, since a patch can be made very easily and sometimes automatically from a complete ruleset (just grep it versus vanilla). So major feature selection is in big chunks, each covering an entire game aspect, then small patches can be applied with individual tweaks. Link to comment Share on other sites More sharing options...
babyjebu5 Posted November 10, 2012 Share Posted November 10, 2012 So glad someone is working on this. I could and would use this tool next playthrough. This time around I adopted most of Warspace and merged other little bits by hand. This would make that process easier. While doing so I noticed many balance changes made to fit one mod and not the other, like HP changes to lower HP on "soldier" and then simultaneously increase it on the armors - and another mod that altered armor HP with balance elements on Will. With only one or the other the balance the mod isn't performed as intended (suggestion: could make for a good tooltip or warning when merging mod schemes) Link to comment Share on other sites More sharing options...
dreadylein Posted November 10, 2012 Share Posted November 10, 2012 But it's only possible to patch lines with unique option names.There are some lists, for instance UFOAlloys=30 is followed by UFOAlloys=60, for different UFOs. These can't be patched. Know that feeling :DYou are able to cicumvent this problem by counting the lines, this is how the engine does it :) Do you plan to patch it in one go or just line by line into the binary ? Link to comment Share on other sites More sharing options...
FMod Posted November 11, 2012 Author Share Posted November 11, 2012 Know that feeling :DYou are able to cicumvent this problem by counting the lines, this is how the engine does it :)The engine doesn't exactly circumvent it, seems like it's designed to read the lines in order.It's technically possible to keep the whole block of same-name lines as a patch and apply it. But that would break automatic patch creation functionality and complicate patch creation. since it will create potentially game-breaking patches. Such patches would have to be made by hand and observing a rule (keep the whole block), which goes against the concept that a patch is simply the lines you want changed.Better to exclude these blocks altogether. While doing so I noticed many balance changes made to fit one mod and not the other, like HP changes to lower HP on "soldier" and then simultaneously increase it on the armors - and another mod that altered armor HP with balance elements on Will. With only one or the other the balance the mod isn't performed as intended (suggestion: could make for a good tooltip or warning when merging mod schemes)Well, I don't see a lot of ways around that. The idea is not so much to merge mods at will as to enable partial mods, or mods that are designed from the start to have user-selectable options. Anyway, I don't have a properly working version just yet, but here is a couple screenshots of how it all looks: http://imageshack.us/a/img689/5065/modbuilder031.png http://imageshack.us/a/img84/775/modbuilder032.png Yeah, not quite a real WinAPI GUI. I started it to just make my mod customizable, and it kinda got out of hand. Don't worry, it won't change looks in the midst, these are just different visual schemes, not sure which to use as default. Not that it's the most important thing. Link to comment Share on other sites More sharing options...
dreadylein Posted November 11, 2012 Share Posted November 11, 2012 (edited) Why would it break the automated patching abiltiy ? Or do you plan to use the same format as the ini itself for your modfiles ? Edited November 11, 2012 by dreadylein Link to comment Share on other sites More sharing options...
Ensais Posted November 11, 2012 Share Posted November 11, 2012 I am very intersted in this. I fall into the category of not good at modding (and I would rather spend the time playing, if all you good people with expertise are doing it anyway). So I played Warspace mod with second wave unlocked on Classic as my third playthrough. Definitley fun, until they patched. Now it seems no mods work. In addition to his changes on how panick works (for countries/continents/ individual soldiers)I also like other ideas I saw, such as having more buff recruits and grapples working farther, etc. So I would love to mix and match. Good luck! Link to comment Share on other sites More sharing options...
FMod Posted November 11, 2012 Author Share Posted November 11, 2012 (edited) Why would it break the automated patching abiltiy ? Or do you plan to use the same format as the ini itself for your modfiles ?Automatic patch creation (not automatic patching) functionality is quite simple. It can be accomplished by fgrep -v -x -f new_mod.txt vanilla.txt >patch.txt. I'll try to add some whitespace cleaning, but other than that, this is it. Patching itself takes a little more, it involves splitting lines around a delimiter, matching left parts and replacing right parts. However, if you were to change national funding, for instance, you wouldn't be changing lines that are 0, so this grep hack would ignore them and thus lose the order. Mod file format is exactly the same as the ini from exe and how it's used with modpatcher. The only difference is that you can remove the lines you don't need and leave just the changes. That's something I want to keep as is - as they say, "keep it simple", and it doesn't get any simpler. It could be possible to work around this manually, making individual routines for every section, but... this isn't Wrye Bash, my resources are too limited. XCOM doesn't need Wrye Bash, though, 98% of the things one might want can be done with sections and patches. I might enable "at your own risk" brute force patching. Even so, I'll rather have these patches work as context diffs, then include diff and patch tools and UI for them within the program. It will take a little more effort for the modder, and this format is different from that for other patches, and it's not quite so easy to edit manually, but at least it's reliable. Edited November 11, 2012 by FMod Link to comment Share on other sites More sharing options...
FMod Posted November 14, 2012 Author Share Posted November 14, 2012 (edited) All right, I have the first preview ready.Version 0.4 pre-alpha can be downloaded here: http://www.mediafire.com/?0kdm8aeo9du3gv9 Please keep in mind that this is hardly a practical tool right now. It kinda does the job, but in a fragile way.Well... A very limited job. All this specific preview contains is a split Vanilla ruleset, a split Warspace ruleset, a few extra parts from a beta mod, and an ability to mix-and-match their pieces. Aside from patches, the main thing it lacks is tens of safety checks that such a utility requires for successful end user application. Right now, with an incorrect input here and there, it's possible to break the game - though it's easily fixed back with modpatcher or automatic backups of course. For this reason I'm posting it here rather than on nexus proper. Though it includes a lot of fluff like the UI, options setup, game folder checking, load/save functions, etc. So instead of a well-polished simple tool, it's a broad but shallow overview. Don't worry too much, though, you don't have to backup the whole game to use it, it only ever touches the exe, prompts you just in case, and makes a backup anyway. I'll publish this officially (mod number 80), then follow up with an alpha that should be more useful.By the beta version, it should include: * Some foolproofing * Patches * Automated patch creation * Automated mod splitting with modfiles.ini configuration * More included components Possibly I'll try to further simplify mod making, but so far that's what it is.The file can be unpacked about anywhere convenient, I use XCOM directory (but I have it linked from root). The idea for this preview is just to let you see how to use it, how it works in general, and get an idea of whether you'd be interested.Or tell me what to change - right now I can change about anything, it will not be so easy later.But at least just check if it works for you. Might not, I have no idea. Edited November 15, 2012 by FMod Link to comment Share on other sites More sharing options...
Recommended Posts