Snarko's Options mod

snarko

DLLer
Joined
Dec 9, 2003
Messages
1,512
Location
Sweden
The 0.23b version is available.
Requires Fall from Heaven 2 0.40h

This modmod makes more options available in the game and improves some of the already existing ones. The included options are:
  • Barbarians (more than just none/default/raging)
  • Barbarian cities
  • Animals
  • Separating barbarian animals and/or demons/undead into their own civ(s)
  • Permanent alliance max member (up to 34!)
  • Decimal experience (for example 12.29 instead of 12)
  • Scale barbarian heroes. Increases/lowers the strength of the barbarian heroes by difficulty level.
  • Improved AI diplomacy. The AI will make demands/request for help etc to other AIs, not just the human.
  • Modify religion spread by alignment. Making the Order more likely to spread to good civs, less likely to neutral/evil, etc.
  • AI bonus by time. The longer you play the higher the AIs bonuses get.
  • Better seafaring AI. AI will expand and invade better over the seas.
  • Set the minimum amount of resources. Either per player or absolute amount.

As this is an early version there may be some bugs around. If you find one please report it in this thread.
 

Attachments

  • CvGameCoreDLL.040hOptionsMod.rar
    3.6 MB · Views: 144
In the next version:
  • XML based barbarian civs

To do:
  • Make it MP compatible.
  • See schedule in the next post.

Under consideration:
  • Lots. I have no shortage of ideas.

Changelog:

First version 25-06-2007.
Includes
  • Barbarians
  • Barbarian cities
  • Animals
  • Permanent alliance max member
  • Culture defense multiplier
  • Decimal experience
  • Animal frenzy
  • Scale barbarian heroes
  • AI diplo demands
  • Set the minimum amount of resources. Either per player or absolute amount.
  • Profiles system.


0.2 beta 01-08-2008
  • Updated to work with FfH2 032l
  • Removed:
    • Removed the animal frenzy option
    • Removed the culture defense modifier option.
  • Added:
    • Added a barbarian animal civ option
    • Added a barbarian demon civ option
    • Added a religion spread by alignment option
  • Changed:
    • All options, save booleans and permanent alliances, have been changed into percentages.
    • Improved the random option (see below)
    • You can enter a custom value without first selecting custom value. The game will automaticly select an appropriate option.
    • Changed the AI diplo demands option to a new AI diplo option, with many improvements:
      • The AI will not make any demands unless their power is more than 4/3 of yours. This is because the AI will never accept such demands. Requests for help (pleased or friendly) are not affected by this rule.
      • The AI won't make demands if they're at war (not including things like civics/religion/you joining them in war)
      • The AI is more likely to make demands the more powerful they are compared to you. The same applies to giving you things and the opposite to asking you for help.
      • The AI will not ask you to join a war if you are already at war
      • The AI will no longer decide who to ally based on how long they've had defensive pact/shared war. Instead they decide based on the strength of the other civ and their attitude towards it. This scale with the permanent alliance option. If you get "we just don't like you enough" but they do like you try increasing your power (or attitude even more).

0.22 29-10-2008
  • Bugs:
    • Fixed a division by zero error if an AIs power was 1 or 0. (CvPlayerAI.cpp)
    • If barbarian animal civ option is not on then animals will still spawn with HN (CvGame.cpp)
  • Changed:
    • MODOPTION_BARBARIANS will no longer increase spawnrate of lairs beyond a setting of 500. (CvPlot.cpp)
    • With new diplo option on AI prefer giving away/demanding less valuable techs, rather than completly random. (CvPlayerAI.cpp)
  • Added:
    • Added AIBonusbytime modoption. (many files)


0.23b 28-11-2008
  • Changed:
    • Changed the maximum AIbonusbytime, except for workrate, to 75%. (several files)
  • Added:
    • Added MODOPTION_BETTERSEAAI. (several c++ files, CIV4SpellInfos.xml (enabling crew promotions), CIV4UnitInfos.xml (caravels can now use sea settler AI))


0.23b 14-12-2008
  • Bugs:
    • Fixed a minor bug where it wouldn't always select "custom value" when you entered a custom value. (CvModOptionsScreenCallbackInterface.py)
  • Changed:
    • Improved the MODOPTION_BETTERSEAAI option (several c++ files, CIV4SpellInfos.xml (enabling declare nationality))


0.24 28-12-2008
  • Updated to work with FfH2 040h
 
Schedule:

14th december
0.23
Finished with better sea AI option.


28th december
0.25
Change the barb civ options to be XML based, with a single bool to turn it on/off.
Alternatively a single XML setting to turn it on/off, so that it's not even loaded if turned off.


1st january
0.32
Add an option to reverse barbarian spawning (more settled --> more barbs)


11th january
0.33
Improve the AI diplo option
--> AI offer something in exchange for war (sometimes)
--> AI more willing to give good deals to humans, but remember them (-1 "you are selfish in your trading", less willing to make bad deals)


18th january
0.34
Improve installer, add uninstaller.


1st february
0.35
???
 
What do you think? Should I focus on making dropdowns, or should I use editboxes and only use dropdowns when there is clearly a limited number of options? (Like with permanent alliances: no reason to allow for values above 18)

The last you said. But it would be interesting (within limits of possibility) for editboxes to display the default values, and/or some sort of short explanation or warning when you insert values far off the default.

Very interesting project btw. Thank you for your work.
 
I'd prefer dropdowns and checkboxes. I'd actually prefer sliders over editboxes.
 
I don't know where you're putting this code, but if it's before the "map checker", it might be nice to put enter-able information for, say, the minimum numbers of some resources (such as mana).
 
I put it onGameStart. I have barely looked at map scripts/generation before so I don't know what "map checker" you're talking about but onGameStart is problably after that.
I like the idea but it might be better made as a different system (even if using the same screen). Perhaps I will do it when I feel that this one is starting to get close to being finished. Or when I want to do something different :)
 
Yes it does. The maximum is whatever you set that option to. But it's not easy to make a huge alliance. The other team's AIs has to like your team enough and not just you personally.
 
Between the two, I think the drop-down boxes would work better for a wider audience; displaying a name with the true value in brackets 'Huts only (0)'.

Those of us that might want to tweak such things to exact numbers would prefer edit boxes, but then again most of this user group can easily edit these values if needed.

Sliders are the best option here(re: your example), but between the two choices I'd focus on drop-downs and use edit boxes when it's a variable that would never need an explanation(i.e. time limit).
 
I'm not sure exactly what your target audience for this would be, but I would prefer total control: edit boxes. I know how to go to the XML files and change things, but something like this would be so much better. I would use it quite often.
 
If you use edit boxes you'll have to put lengthy explanations as to what the values actually do, or otherwise limit your mod only to people who already know how to edit these values. For example, say you have your 'number of barbarians' option. If you simply put it as an edit box, you also have to explain that 25 is normal, 50 is raging, -1 is none at all etc which clutters the screen (as it does in your screenshot).

Better to go with drop-down boxes I think. With a drop down box information can be stored in the values themselves (so as you said the values could be none, goodie huts only, a few, normal etc etc etc). That way there is a lot less confusion. Also I don't think there is really any need for any extreme levels of customisation- who's gonna notice the difference between a value of 36 and 37?
 
Is there the ability to display an edit box only after selecting "Custom Value" on a drop down menu? You would then not really need to give such explanations, but would leave the options for fine tuning for those who really care.
 
is it possible to have a dropdown menu AND an editbox at the same time but the editbox be the only field that is taken into consideration ?
For example, number of barbarians. I choose the value 25 from the dropdown menu, which most probably has a short explanation aside (sort of 25 [normal]) and this automatically updates the editbox (which contains the default). I am then able to further edit the value to my liking, knowing from the dropdown menu that 25 is normal, -1 is none, etc.
 
I put it onGameStart. I have barely looked at map scripts/generation before so I don't know what "map checker" you're talking about but onGameStart is problably after that.
I like the idea but it might be better made as a different system (even if using the same screen). Perhaps I will do it when I feel that this one is starting to get close to being finished. Or when I want to do something different :)

Just for your information, the map checking (e.g. placing additional mana) is done from within onGameStart... if I remember correctly.
 
Is there the ability to display an edit box only after selecting "Custom Value" on a drop down menu? You would then not really need to give such explanations, but would leave the options for fine tuning for those who really care.
I second this - it's the best of both options. However, if I had to choose, a drop down list with annotations is going to be easier to use than just an editable box, simply because it'll be able to have some kind of indication of what normal will be. If you could provide that kind of info (eg a mouseover pane or somesuch) for an edit box, then that would be preferable. I don't know how much of that is code-able though.
 
If you use edit boxes you'll have to put lengthy explanations as to what the values actually do, or otherwise limit your mod only to people who already know how to edit these values. For example, say you have your 'number of barbarians' option. If you simply put it as an edit box, you also have to explain that 25 is normal, 50 is raging, -1 is none at all etc which clutters the screen (as it does in your screenshot).
That explanation you see is the tooltip for that editbox. It won't show up unless you hold your mouse over the editbox.


I have been considering adding a button for advanced/simple mode. Simple mode would be dropdowns and advanced editboxes. But perhaps advanced should be both dropdowns and editboxes. Then simple is less cluttered, dropdowns only and advanced allows you to select your own values, without removing the option to use dropdowns. It'll take a fairly large rewrite of the screen but I think it's possible.
 
I couldn't figure out how to do what I wanted. So I went with what MagisterCultuum said except the editboxes are always there. As far as I know the current way of doing things doesn't allow me to hide them, only disable them.

Spoiler Programming reason :
I tried to use CyGInterfaceScreen instead of CyGTabCtrl but I could not figure out how to make an editbox that can be selected. Using addEditBox did nothing as far as I can see. addEditBoxGFC did add an editbox, but clicking on it did nothing. No notify sent to handleInput that I did so - not even a notify when moving my mouse over it. I could enter values, but only by right clicking and selecting paste.


Does this sound like a good solution? Or do you have a better one?
As you can see there is no editbox for the permanent alliances option. This is intentional. Only some dropdowns will have editboxes.
Screenshot:
 

Attachments

  • ModOptions2.JPG
    ModOptions2.JPG
    64.2 KB · Views: 283
Top Bottom