Four Seasons is Updated

Discuss and post your mods and scenarios here for others to download.

Moderator: Vic

User avatar
Ormand
Posts: 823
Joined: Tue Feb 17, 2009 1:31 am

Re: Four Seasons is Updated

Post by Ormand »

OK, let's all take a deep breath and relax.

Yes, I was away for a two-week camping trip to Olympic and North Cascades National Parks. Sorry, not that much internet up there, and maybe I should have announced it.

I haven't abandoned anything, unless I will be forced to. I have actually been working on upgrading the AI for a possible next version of ATG. A lot of work to be done.

I will try to look at what you are seeing., But, be warned that it will take a little time. While I am back, I also managed, SOMEHOW, to come down with my first case of Covid. Overall, it isn't horrible, although I am a bit tired. I didn't know it was, and we actually did quite a few hikes until I finally did a test. Then, we decided to drive back, 960 miles. So, I've had it for a week, and only now am able to actually rest. I don't have bad symptoms, at fir5st it was more like a cold, with a clogged nose, but now just some fatigue and lack of energy. So, it will be a while to actually dive into some hard stuff.

Keep in mind that primarily, 4S was made for random games, and for stand-alone games, one needs to do some "surgery" on events to keep some and stop others.

There is also something of an outdated manual in the directory FourSeasons/Manual.
One man alone can be pretty dumb sometimes, but for real bona fide stupidity, there ain't nothin' can beat teamwork -- Edward Abbey
User avatar
Ormand
Posts: 823
Joined: Tue Feb 17, 2009 1:31 am

Re: Four Seasons is Updated

Post by Ormand »

lion_of_judah wrote: Tue Jul 30, 2024 4:14 am I just finished the map, and regimes, but do not have any SFT's, or TO&E made yet. I wanted to see how the map would look in game, so I started a game with this unfinished scenario. I received the following error and do not know how to fix this once I have resources on the map.
This is due to Rulevar(938) = 1, which allows resources to be interdicted. As part of this, as has been mentioned in the beta releases, a destination hex needs to be specified, otherwise, the ATG code doesn't know how to do the interdiction, as the resources need to go somewhere. This is typically the capital, or wherever you want it to be. To turn interdiction off, set Rulevar(938) = 0. To set the destination hex, use the exec function

ExecSetResDestXY(RegNr, X, Y)

It is in the "Hex & Areaslots" category. Perhaps, it should be in Regimes. If you have Rulevar(938) = 1, every regime MUST have a destination hex set.
One man alone can be pretty dumb sometimes, but for real bona fide stupidity, there ain't nothin' can beat teamwork -- Edward Abbey
User avatar
Ormand
Posts: 823
Joined: Tue Feb 17, 2009 1:31 am

Re: Four Seasons is Updated

Post by Ormand »

ernieschwitz wrote: Thu Aug 08, 2024 1:34 am I think that stringlists are part of this problem. If I recall correctly Ormand, has made some event code that refers to lines in a stringlist that ask for multiple graphics files, in a subdirectory. It was exactly a way to make a tedious piece of coding more efficient. In this case it was done for Models.
I don't think this is the case models, these images are hard-coded in the events. The new stringlist idea was introduced as a way to make it much easier to to set the people specific graphics. There are some stringlists used for things like pre-loaded TOEs. But, I also use stringlists to keep track of some things. For example, if you play with models, the AI cannot, so I need to keep track of what they cost for each regime, and reload the costs at the start of the turns. I set it up so that if you use models, you CANNOT use the standard SFTypes. One or the other. This is also used for tech costs as well. The AI cannot use models, so it can't research the techs needed to upgrade models and the like. So, the tech costs are put into a stringlist, and then loaded at the start of the regime's turn.
One man alone can be pretty dumb sometimes, but for real bona fide stupidity, there ain't nothin' can beat teamwork -- Edward Abbey
User avatar
ernieschwitz
Posts: 4533
Joined: Tue Sep 15, 2009 3:46 pm
Location: Denmark

Re: Four Seasons is Updated

Post by ernieschwitz »

Thanks for clearing that up. I just figured you put the graphics location into a stringlist.
Ormand wrote: Sun Aug 11, 2024 12:18 am
ernieschwitz wrote: Thu Aug 08, 2024 1:34 am I think that stringlists are part of this problem. If I recall correctly Ormand, has made some event code that refers to lines in a stringlist that ask for multiple graphics files, in a subdirectory. It was exactly a way to make a tedious piece of coding more efficient. In this case it was done for Models.
I don't think this is the case models, these images are hard-coded in the events. The new stringlist idea was introduced as a way to make it much easier to to set the people specific graphics. There are some stringlists used for things like pre-loaded TOEs. But, I also use stringlists to keep track of some things. For example, if you play with models, the AI cannot, so I need to keep track of what they cost for each regime, and reload the costs at the start of the turns. I set it up so that if you use models, you CANNOT use the standard SFTypes. One or the other. This is also used for tech costs as well. The AI cannot use models, so it can't research the techs needed to upgrade models and the like. So, the tech costs are put into a stringlist, and then loaded at the start of the regime's turn.
Creator of High Quality Scenarios for:
  • Advanced Tactics Gold
    DC: Warsaw to Paris
    DC: Community Project.
Try this Global WW2 Scenario: https://www.vrdesigns.net/scenario.php?nr=280
GaryChildress
Posts: 6907
Joined: Sun Jul 17, 2005 3:41 pm
Location: The Divided Nations of Earth

Re: Four Seasons is Updated

Post by GaryChildress »

Welcome back!
User avatar
lion_of_judah
Posts: 2306
Joined: Mon Jan 08, 2007 6:36 pm
Location: somewhere over the rainbow

Re: Four Seasons is Updated

Post by lion_of_judah »

welcome back, sorry you got covid. Curious if you lost the sense of taste. My wife didn't really lose the sense of taste, but she use to love milk. Now she doesn't really drink it like she use to. When I had it a couple of years ago, I didn't lose my sense of taste, but many people said they did.

I didn't really put any resources on the map, except oil. How can I have ore and oil produce automatically, without resource locations. I'm using gary's new images for SFT. I did a work around resources wise, by adding oil and ore cards. Also, the manpower event ernie made, doesn't work. Also, the partisan option does not work, as it places partisans in ocean hexes and in neutral nations, not in the nation which is at war against the attacker.
GaryChildress
Posts: 6907
Joined: Sun Jul 17, 2005 3:41 pm
Location: The Divided Nations of Earth

Re: Four Seasons is Updated

Post by GaryChildress »

lion_of_judah wrote: Sun Aug 11, 2024 3:42 pm welcome back, sorry you got covid. Curious if you lost the sense of taste. My wife didn't really lose the sense of taste, but she use to love milk. Now she doesn't really drink it like she use to. When I had it a couple of years ago, I didn't lose my sense of taste, but many people said they did.

I didn't really put any resources on the map, except oil. How can I have ore and oil produce automatically, without resource locations. I'm using gary's new images for SFT. I did a work around resources wise, by adding oil and ore cards. Also, the manpower event ernie made, doesn't work. Also, the partisan option does not work, as it places partisans in ocean hexes and in neutral nations, not in the nation which is at war against the attacker.
I have a New Dawn random game that is set up with Manpower. I just ran it with the latest Phoenix patch that I have and it seems to work OK. IIRC, a capital city generates 100 manpower/turn and regular cities generate 50. Rifle and SMG units use 3 manpower, engineers, MGs and mortars etc, use 2 manpower and vehicles all use 1 manpower. There's a counter at the top where Ore and Oil are that tells you how much manpower you have and how much you're using in production the next turn, however, it does not say how much manpower you are earning per turn. I couldn't figure out that part. You just have to multiply the number of cities by 50/turn and one of them (the capital) donates 100/turn (based on # of Victory Points).

Basically, there's an event to count cities the player owns, multiply the number by 50 and add it to the regime slot "Manpower". I think I had to go into each item to set the item's manpower cost manually for it to subtract correctly. If I can set it up, anyone can do it.

Here are the relevant screen shots (I think). Of course, I didn't work into the code how to exclude enemy cities from manpower count (or perhaps give them a drastically reduced production of Manpower for the cause of their conquerer). But maybe you can figure out how to do that. If I can figure it out, anyone can.
Attachments
STEP 1: Create regime slot.
STEP 1: Create regime slot.
Settings Window.jpg (117.05 KiB) Viewed 522 times
STEP 2: Create event.
STEP 2: Create event.
Event Screen.jpg (114.77 KiB) Viewed 522 times
STEP 3: Assign usage cost to items.
STEP 3: Assign usage cost to items.
Item Screen.jpg (422.16 KiB) Viewed 522 times
FINISHED PRODUCT
FINISHED PRODUCT
In Game.jpg (419.16 KiB) Viewed 522 times
User avatar
lion_of_judah
Posts: 2306
Joined: Mon Jan 08, 2007 6:36 pm
Location: somewhere over the rainbow

Re: Four Seasons is Updated

Post by lion_of_judah »

Gary
I copied what you did for manpower, but instead of 10, it is slot 98 in regime slot names. I started a test game and it's not adding any new manpower?
Attachments
manpower setup.png
manpower setup.png (120.7 KiB) Viewed 519 times
User avatar
lion_of_judah
Posts: 2306
Joined: Mon Jan 08, 2007 6:36 pm
Location: somewhere over the rainbow

Re: Four Seasons is Updated

Post by lion_of_judah »

This is a screenshot of my scenario I'm working on. The map extends from southern US, to Almost all of Chile. This screenshot is of panama and columbia
Attachments
Columbia and panama.png
Columbia and panama.png (1.2 MiB) Viewed 518 times
GaryChildress
Posts: 6907
Joined: Sun Jul 17, 2005 3:41 pm
Location: The Divided Nations of Earth

Re: Four Seasons is Updated

Post by GaryChildress »

lion_of_judah wrote: Sun Aug 11, 2024 9:22 pm Gary
I copied what you did for manpower, but instead of 10, it is slot 98 in regime slot names. I started a test game and it's not adding any new manpower?
I'll try modding 4 Seasons and see what happens. Maybe there are events in it that conflict, or perhaps I missed something else I did. It's been a while since I was working with manpower. I'll give it a try.
GaryChildress
Posts: 6907
Joined: Sun Jul 17, 2005 3:41 pm
Location: The Divided Nations of Earth

Re: Four Seasons is Updated

Post by GaryChildress »

lion_of_judah wrote: Sun Aug 11, 2024 9:25 pm This is a screenshot of my scenario I'm working on. The map extends from southern US, to Almost all of Chile. This screenshot is of panama and columbia
Looks nice BTW.
GaryChildress
Posts: 6907
Joined: Sun Jul 17, 2005 3:41 pm
Location: The Divided Nations of Earth

Re: Four Seasons is Updated

Post by GaryChildress »

lion_of_judah wrote: Sun Aug 11, 2024 9:22 pm Gary
I copied what you did for manpower, but instead of 10, it is slot 98 in regime slot names. I started a test game and it's not adding any new manpower?
OK. I think I may have found the problem. I need to test out a theory. I forgot to add a step and I'm not sure if I can do it with 4 Seasons but I'm going to try a quick fix. Bear with me for a few.
GaryChildress
Posts: 6907
Joined: Sun Jul 17, 2005 3:41 pm
Location: The Divided Nations of Earth

Re: Four Seasons is Updated

Post by GaryChildress »

I think I got Manpower to work in 4 Seasons. There are a couple of extra steps, to what I did above. 2 steps I forgot and 1 step that I didn't forget but didn't clarify that it was a "Round Check" and not a "No Check" event.
User avatar
ernieschwitz
Posts: 4533
Joined: Tue Sep 15, 2009 3:46 pm
Location: Denmark

Re: Four Seasons is Updated

Post by ernieschwitz »

GaryChildress wrote: Sun Aug 11, 2024 5:53 pm
lion_of_judah wrote: Sun Aug 11, 2024 3:42 pm welcome back, sorry you got covid. Curious if you lost the sense of taste. My wife didn't really lose the sense of taste, but she use to love milk. Now she doesn't really drink it like she use to. When I had it a couple of years ago, I didn't lose my sense of taste, but many people said they did.

I didn't really put any resources on the map, except oil. How can I have ore and oil produce automatically, without resource locations. I'm using gary's new images for SFT. I did a work around resources wise, by adding oil and ore cards. Also, the manpower event ernie made, doesn't work. Also, the partisan option does not work, as it places partisans in ocean hexes and in neutral nations, not in the nation which is at war against the attacker.
I have a New Dawn random game that is set up with Manpower. I just ran it with the latest Phoenix patch that I have and it seems to work OK. IIRC, a capital city generates 100 manpower/turn and regular cities generate 50. Rifle and SMG units use 3 manpower, engineers, MGs and mortars etc, use 2 manpower and vehicles all use 1 manpower. There's a counter at the top where Ore and Oil are that tells you how much manpower you have and how much you're using in production the next turn, however, it does not say how much manpower you are earning per turn. I couldn't figure out that part. You just have to multiply the number of cities by 50/turn and one of them (the capital) donates 100/turn (based on # of Victory Points).

Basically, there's an event to count cities the player owns, multiply the number by 50 and add it to the regime slot "Manpower". I think I had to go into each item to set the item's manpower cost manually for it to subtract correctly. If I can set it up, anyone can do it.

Here are the relevant screen shots (I think). Of course, I didn't work into the code how to exclude enemy cities from manpower count (or perhaps give them a drastically reduced production of Manpower for the cause of their conquerer). But maybe you can figure out how to do that. If I can figure it out, anyone can.
This is a perfect example of how two people can skin the same cat differently.

In my code, if I recall correctly, I count up the number of locations of specific types and multiply them by the manpower chosen. To do that I have to loop over the map and count them, for each regime. More precise. However it does require the location number used for cities and capitols be the same in the scenario you import it into. Which is where my code probably fails (I am doing this from memory, don't have my code in front of me).

Erich's code is less precise, but faster. Instead of counting each city type, and multiplying that with the set manpower given for each, he finds the number of Victory Points each regime has, and multiplies that. Works well, if you don't mess with VP assigned for locations, or put VPs on "other stuff" (I have a scenario where you give "flags" VP values).

So there you have it. Different codes, different downsides.
Creator of High Quality Scenarios for:
  • Advanced Tactics Gold
    DC: Warsaw to Paris
    DC: Community Project.
Try this Global WW2 Scenario: https://www.vrdesigns.net/scenario.php?nr=280
User avatar
ernieschwitz
Posts: 4533
Joined: Tue Sep 15, 2009 3:46 pm
Location: Denmark

Re: Four Seasons is Updated

Post by ernieschwitz »

GaryChildress wrote: Mon Aug 12, 2024 1:15 am I think I got Manpower to work in 4 Seasons. There are a couple of extra steps, to what I did above. 2 steps I forgot and 1 step that I didn't forget but didn't clarify that it was a "Round Check" and not a "No Check" event.
Yup, one of the first steps of debugging, is to make sure your code is actually run. Round Check means it is run at the beginning of each Round (just before regime 1), and No Check means: It wont' be run.
Creator of High Quality Scenarios for:
  • Advanced Tactics Gold
    DC: Warsaw to Paris
    DC: Community Project.
Try this Global WW2 Scenario: https://www.vrdesigns.net/scenario.php?nr=280
GaryChildress
Posts: 6907
Joined: Sun Jul 17, 2005 3:41 pm
Location: The Divided Nations of Earth

Re: Four Seasons is Updated

Post by GaryChildress »

lion_of_judah wrote: Sun Aug 11, 2024 9:22 pm Gary
I copied what you did for manpower, but instead of 10, it is slot 98 in regime slot names. I started a test game and it's not adding any new manpower?
I figured out the problem and posted a thread on how to add manpower to 4 Seasons. Hope it helps. :)
User avatar
lion_of_judah
Posts: 2306
Joined: Mon Jan 08, 2007 6:36 pm
Location: somewhere over the rainbow

Re: Four Seasons is Updated

Post by lion_of_judah »

GaryChildress wrote: Sun Aug 11, 2024 10:23 pm
lion_of_judah wrote: Sun Aug 11, 2024 9:25 pm This is a screenshot of my scenario I'm working on. The map extends from southern US, to Almost all of Chile. This screenshot is of panama and columbia
Looks nice BTW.
thank you
User avatar
lion_of_judah
Posts: 2306
Joined: Mon Jan 08, 2007 6:36 pm
Location: somewhere over the rainbow

Re: Four Seasons is Updated

Post by lion_of_judah »

after upgrading my air transports to level 3, I'm now receiving this error
Attachments
error.png
error.png (867.35 KiB) Viewed 479 times
User avatar
ernieschwitz
Posts: 4533
Joined: Tue Sep 15, 2009 3:46 pm
Location: Denmark

Re: Four Seasons is Updated

Post by ernieschwitz »

Go to event 180, and see what line 16 says. It may or may not be related.
Creator of High Quality Scenarios for:
  • Advanced Tactics Gold
    DC: Warsaw to Paris
    DC: Community Project.
Try this Global WW2 Scenario: https://www.vrdesigns.net/scenario.php?nr=280
User avatar
ernieschwitz
Posts: 4533
Joined: Tue Sep 15, 2009 3:46 pm
Location: Denmark

Re: Four Seasons is Updated

Post by ernieschwitz »

Always provide as much context to a bug as possible. In this case the version number of 4Seasons would have been nice. After looking through a few of those, I found one, finally that had an event 180 in it.

The line of code that is failing is one that checks for a units location and uses that to determine what landscape is at the current unit being checked. Since there is nothing wrong with that line of code, as far as I could tell, I am inclined to think that something else is amiss.

My guess is that you have loaded a unit onto a ship. Units that go on a ship get assigned a hex outside the realm of things. So when the line of code that makes the error is run, then it returns an error message, since there is no landscape to check.

In other words, this is a fault in Ormand's code (I think) that should be fixable, by inserting a check that asks if the unit is off-map, and if it is, to ignore it.
Creator of High Quality Scenarios for:
  • Advanced Tactics Gold
    DC: Warsaw to Paris
    DC: Community Project.
Try this Global WW2 Scenario: https://www.vrdesigns.net/scenario.php?nr=280
Post Reply

Return to “Mods and Scenarios”