Author Topic: A Few Questions  (Read 8734 times)

Offline MFive

  • Captain
  • ***
  • Posts: 95
  • Lazy Sectoid
    • View Profile
A Few Questions
« 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
« Last Edit: October 02, 2013, 06:16:05 am by MFive »

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: A Few Questions
« Reply #1 on: October 02, 2013, 07:15:10 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
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:



The problematic lines are highlighted in red. They have evil tabs and YAML just hates those (spaces-only territory).

Offline MFive

  • Captain
  • ***
  • Posts: 95
  • Lazy Sectoid
    • View Profile
Re: A Few Questions
« Reply #2 on: October 02, 2013, 07:26:07 am »
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  :)

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: A Few Questions
« Reply #3 on: October 02, 2013, 12:08:35 pm »
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" :) )

Offline MFive

  • Captain
  • ***
  • Posts: 95
  • Lazy Sectoid
    • View Profile
Re: A Few Questions
« Reply #4 on: October 02, 2013, 10:35:58 pm »
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)

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: A Few Questions
« Reply #5 on: October 03, 2013, 12:16:52 am »
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 ;)

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: A Few Questions
« Reply #6 on: October 03, 2013, 05:07:54 am »
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. ;)

Offline MFive

  • Captain
  • ***
  • Posts: 95
  • Lazy Sectoid
    • View Profile
Re: A Few Questions
« Reply #7 on: October 03, 2013, 06:03:39 am »

Offline luke83

  • Commander
  • *****
  • Posts: 1559
    • View Profile
    • openxcommods
Re: A Few Questions
« Reply #8 on: October 03, 2013, 01:41:43 pm »
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++ :-[

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: A Few Questions
« Reply #9 on: October 03, 2013, 06:19:43 pm »
: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 would probably cut down on editing errors.

Offline MFive

  • Captain
  • ***
  • Posts: 95
  • Lazy Sectoid
    • View Profile
Re: A Few Questions
« Reply #10 on: October 03, 2013, 09:25:12 pm »
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 :'(