OpenXcom Forum
Modding => Work In Progress => Topic started by: MFive on October 02, 2013, 05:40:14 am
-
Question #1
i was wondering, are advanced options added via ruleset, or .cfg file, if one of these, how do i add them?
i have a mod brewing, but not sure how far it can get givin my extremely limited experience, was thinking that is a start adding these(as i planned on its features be optional) at the start it would be easier
Question #2
as explained above, i am very new at this so, can i ask what is wrong with this ruleset that i am working on, the problem is an 'illegal block entry' on line 20, column 4. i simply don't understand what the problem is, i have copied the code from the main ruleset and simply changed what research is depending on what research
-
Question #1
i was wondering, are advanced options added via ruleset, or .cfg file, if one of these, how do i add them?
i have a mod brewing, but not sure how far it can get givin my extremely limited experience, was thinking that is a start adding these(as i planned on its features be optional) at the start it would be easier
Advanced Options are only for controlling game code features. If you want your ruleset to have various "options", I would suggest putting each in separate rulesets so people can pick and choose the combination they want (eg. a base ruleset with all the default stuff and extra ones for small changes from the default).
Question #2
as explained above, i am very new at this so, can i ask what is wrong with this ruleset that i am working on, the problem is an 'illegal block entry' on line 20, column 4. i simply don't understand what the problem is, i have copied the code from the main ruleset and simply changed what research is depending on what research
The problem is always tabs. :P Get a good text editor that supports YAML and these kind of errors will be highlighted for you:
(https://i.imgur.com/ziejWFn.png)
The problematic lines are highlighted in red. They have evil tabs and YAML just hates those (spaces-only territory).
-
sounds a good idea, though it will make installation a bit of a pain(unless i can make a script to add the line automatically)
thanks for the help :)
-
MFive, if you add additional ruleset files (=yaml text files with the .rul extensions) and add them to the "ruleset load queue" in the options.cfg, the rules inside the additional files will override the previously loaded ones. I don't think there is a limit to how many rulesets can be loaded, but they are loaded in sequence and the later ones always overrule the earlier ones. if your "extra mod rulesets" make use of features already added via a "base mod ruleset", you don't need to put those rules into the "extra mod ruleset" again.
what I was trying to say is that "installation" of rulesets isn't necessary - the additional rules reside in their own ruleset file, and the options.cfg tells the game which ruleset files to load and in which sequence. the original openxcom ruleset file never needs to be changed. if you want to for example "disable" a weapon that is present in the original ruleset, you can simply load a rule with the same name in your additional ruleset file that contains a requirement that cannot be met.
(I hope this didn't confuse matters even more, and I hope I didn't misunderstand you when you wrote about "installation" :) )
-
installation is the closest word i can think of, though after re-reading Super's post, (i tend to skim read a lot) a few rulesets are not that bad, but originally i had the idea of allowing 'every' feature in my mod to be turned off and on via advanced options(though i now understand that is not possible for rulesets) so when he said to just make a few rulesets(agen, skim reading) i was like O.o 10 ish rulesets for a single mod would be rather inconvenient
i found it a bit of a pain to copy/pasta around 8 ish ruleset names into my cfg file(perhaps steam has made me lazy :P)
-
yeah, it would be nice to have a pre-loader at some point that lets you choose the rulesets you want to use (and perhaps warns you if you have savegames that use certain rulesets...), but that's just a convenience thing ;)
-
It's coming guys, hold your horses. :P At this rate we're never gonna get to the super cool amazing awesome new modding framework thing for 2.0. ;)
-
2.0.
:O what happened to 1.0? :D
-
It's coming guys, hold your horses. :P At this rate we're never gonna get to the super cool amazing awesome new modding framework thing for 2.0. ;)
I hope 2.0 has more support for helping people fix broken rulesets , maybe even just telling them what line is causing a issue, i am having plenty of problems getting these things to work , even after downloading notepad++ :-[
-
:O what happened to 1.0? :D
It's coming soon, doesn't mean I can't have future future future future ideas. ;)
I hope 2.0 has more support for helping people fix broken rulesets , maybe even just telling them what line is causing a issue, i am having plenty of problems getting these things to work , even after downloading notepad++ :-[
It's kinda tricky since yaml-cpp does most of the work so we can just pass on whatever error it throws, but we'll see what we can do. Something like MARS (https://openxcom.org/forum/index.php/topic,1361.0.html) would probably cut down on editing errors.
-
When I have errors in my rule sets it tells me what line is the problem, I just wish it told me which rule set was the problem :'(