Page 5 of 6

Re: "Simulation" ruleset - WORK IN PROGRESS

Posted: Thu Dec 09, 2021 2:50 am
by cazfi
The MaxUnitsOnTile is implemented as simple comparison against tile's unit list size, so both "DoesntOccupyTile" and transported units count.

Re: "Simulation" ruleset - WORK IN PROGRESS

Posted: Thu Dec 09, 2021 9:49 am
by Corbeau
Yeah, this is not a perfect solution. It would be nice to have some diversification. Another option - best, in my opinion - would be to not allow units to ENTER the tile if stack limit is reached. But yes, transported units and air level should be excluded.

Re: "Simulation" ruleset - WORK IN PROGRESS

Posted: Fri Dec 10, 2021 10:16 pm
by Dino the Dinosore
Thanks, this is good to know. I updated the wiki page about Requirements so this is now documented.

Agree it would be nice to have something better, maybe it's worth filing an enhancement request? How about a new requirement "MaxCombatUnitsOnTile", which is same as "MaxUnitsOnTile", but does not count units with UnitClassFlag "DoesntOccupyTile" or with UnitFlag "NonMil", nor transported units.

Wondering how you could implement not allowing units to ENTER the tile if stack limit is reached - would need changes to basic game engine, or making unit moving an Action.

Re: "Simulation" ruleset - WORK IN PROGRESS

Posted: Fri Dec 10, 2021 10:35 pm
by Dino the Dinosore
More questions about SIM30 ruleset -
1 The Simulation ruleset wiki page says "naval units cause no unhappiness when on a mission" - how is this implemented? I'm guessing on the server side, don't think it's possible from ruleset files.
2 Wiki page also says "You don’t need an embassy to make treaties" - same question, and I'm guessing same answer.
3 The Five Year Plan wonders - wondering about the numbers. The 1st costs 200 shields, so if you have 20 cities it starts paying off after 10 turns. But the 5th costs 1000 shields, so even with a huge empire of 40 cities it would take 25 turns to pay off, which doesn't seem worth it. Maybe make them all the same cost? Or have them increase shields by a percent (5-10%, say) so the benefit would compound?

Re: "Simulation" ruleset - WORK IN PROGRESS

Posted: Fri Dec 10, 2021 11:01 pm
by cazfi
Dino the Dinosore wrote:or making unit moving an Action.
It is in 3.1. Haven't checked if disallowing movement by target tile's unit count would work.

Re: "Simulation" ruleset - WORK IN PROGRESS

Posted: Tue Dec 14, 2021 5:08 am
by Dino the Dinosore
Playing with SIM30 some more - I really like the resort on the mountain idea, but the code in SIM30 terrain.ruleset doesn't work. The line
causes = "Irrigation"
conflicts with line in [terrain_mountains]
irrigation_result = "no"
resulting in the UI not showing the Build Irrigation menu item, and there's no way to build the resort. The SIM26 & SIM25 lack the "causes =" line, which makes me wonder if there is a default value for "causes =", and whether this ever worked. I have gotten my own version to work by making Resort a base, thus -

Code: Select all

[extraui]
ui_name_base_fortress="?gui_type:Build Fort/Fortress/Buoy/Resort"
...
[extra_resort]
name           = _("Resort")
category       = "Infra"
causes         = "Base"
graphic        = "base.resort"
graphic_alt    = "base.buoy"
activity_gfx   = "unit.resort"
act_gfx_alt    = "unit.buoy"
rmact_gfx      = "None"
rmact_gfx_alt  = "-"
reqs           =
    { "type", "name", "range", "present"
      "Tech", "Explosives", "Player", TRUE
      "Terrain", "Mountains", "Local", TRUE
      "Extra", "Road", "Local", TRUE
      "UnitType", "Settlers", "Local", TRUE
      "CityTile", "Center", "Local", FALSE
    }
build_time     = 5
border_sq      = 0
vision_main_sq = 4
helptext       = _("\
Resorts on mountains are used for rest and recreation, \
resulting in +2 trade. Use the Combat menu to issue the order to build a Resort.\
")
...
[base_resort]
extra          = "Resort"
gui_type       = "Fortress"
...
[effect_mountain_resort]
type    = "Output_Add_Tile"
value   = 2
reqs    =
{	"type", "name", "range"
	"Extra", "Resort", "Local"
	"OutputType", "Trade", "Local"
}	

I added Road requirement and reduced build_time, and increased trade benefit to +2.
The wiki page says -
Researching Explosives makes it possible to build Resorts on Hills and Mountains, resulting in +2 Trade
but in the SIM30 code it is not possible to build on Hills and it's just +1 Trade.

Re: "Simulation" ruleset - WORK IN PROGRESS

Posted: Wed Dec 15, 2021 2:11 pm
by Corbeau
Huh, thanks! I'll check all this when I get the time! I have a bunch of notes that need addressing, this one goes on it, too!

Re: "Simulation" ruleset - WORK IN PROGRESS

Posted: Wed Dec 22, 2021 4:52 am
by Dino the Dinosore
I've added the resort terrain alteration, and the Food Market, Grocery Store, and Shopping Mall buildings to the ruleset I'm working on. Not satisfied with using just the graphic_alt graphics, I spent some time digging thru wikimedia looking for public domain images, and made some graphics files which I can share. Need to also update bases.spec (add 0, 6, "base.resort_mg"), buildings-large.spec (add b.food_market, b.grocery_store, and b.shopping_mall) and the .tilespec (add base.resort) to use them.

Re: "Simulation" ruleset - WORK IN PROGRESS

Posted: Wed Dec 22, 2021 12:12 pm
by Corbeau
Image

Re: "Simulation" ruleset - WORK IN PROGRESS

Posted: Sat Dec 17, 2022 11:24 pm
by Corbeau
After a looong intense period in work-related things, I have finally returned to this. I have more or less finished fixing some bugs and implemented some organic updates, will now work on new features and ideas and suggestions. The ruleset on the GitHub isn't updated yet, but I expect to do it in a few days and, after that, with some testing, plan to start a new Sim game within one month. So if you're interested, watch this space. (The progress can be monitored in the first post of this thread, but it's a mess so maybe it's not worth it too much :)