swfans / swars

Syndicate Wars port, alternative binary for the classic Bullfrog game
Other
91 stars 14 forks source link

Issues with changed research time #47

Open geist22 opened 1 year ago

geist22 commented 1 year ago

Apparently the original game has bugged research times (see https://github.com/mefistotelis/swars/issues/18#issuecomment-1627965470), resulting in much faster research on many items.

Now that this has been addressed, a new issue appears: everyone who would play this port going forward would get a very different experience than anyone who has played the game in the past, or anyone who keeps playing the original version.

To give players an experience closer to the original game, at least one of two things would have to be done:

  1. Implement an option to replicate the original behaviour
  2. Rebalance research to try and give an experience closer to the original

I'm quite the purist when it comes to gameplay, so I'd welcome an option for 1, though from @mefistotelis's previous post it doesn't look he likes the idea much. That would leave us with 2. How could this best be accomplished? My first thoughts would be about less strict diminishing returns for higher funding and/or more scientists.

mefistotelis commented 1 year ago

My idea is for all weapons and mods to be completely configurable via INI files. By completely I mean so that the game never changes behavior based on the integer being type of the weapon, but all aspects of it are defined as properties which exist in the INI.

While the complete INI file is not possible yet, many of the properties can be exported now. Created #48 and #49 to track progress on that.

geist22 commented 1 year ago

Interesting. So by using the same values as the original game, one could replicate the original experience but without using the underlying mechanics. Though the exact values would probably have to be provided, as they're not easily discernable by a player.

mefistotelis commented 1 year ago

I added the INI files with weapons and mods. The files should be included in the latest "actions" build.

If present, they are loaded by the game. If not, original values are used (but I will very likely remove the defaults at some point, making the INIs manatory).

I'm not much into balancing myself, so if you'd like to take a look - feel free to do so. You can propose the changes either here in issues, or clone the repository and make a pull request.

geist22 commented 1 year ago

I'm thinking of having multiple config files to easily switch between different setups without having to edit a lot of things.

For example: weapons_custom.ini weapons_default.ini weapons_original.ini etc.

And if you have a "master" config file, you could then edit there which config the game will use.

I could make a config file with the values from the original game, but I don't know how to get the numbers. Legs lv3 is something between 4k and 5k (actual research cost), Body lv3 between 24k and 25k, Brain between 19k and 20k... It's probably somewhere in the code, but I have no idea where and probably wouldn't understand it anyway. I'd like the exact values so it's always correct with any number of scientists and amount of funding, so it might use divisions instead of numbers, too.

I've made a list of all research items that are subject to the integer overflow:

Pulse Laser Electron Mace Launcher Nuclear Grenade Ion Mine High Explosive Long Range Rifle Satellite Rain Plasma Lance Graviton Gun Persuadertron II Stasis Field Chromotap Displacertron Cerberus IFF Trigger Wire

Legs 3 Body 3 Brain 3 Epidermis 2 Epidermis 3 Epidermis 4

Everything not on this list correctly uses the displayed numbers by default.

mefistotelis commented 1 year ago

I'm thinking of having multiple config files to easily switch between different setups

Currently we're nowhere near in the rewrite to C to be able to properly create custom campaigns. But it is an obvious road forward. Each campaign can then have its own config files, creating custom campaigns and difficulty levels for the original game. This is how KeeperFX evolved.

So at this point, let's create one set of configs, with aim to create game experience close to the original, but without sacrificing logic (I mean. v3 mods should research longer than v2, even if that was not the case in the original).

I don't know how to get the numbers

Just get the latest build, and "conf" folder will contain the files with current values. Or you can view them in github code browser: https://github.com/mefistotelis/swars/blob/master/conf/cybmods.ini

I've made a list of all research items that are subject to the integer overflow

Good. But while re-balancing, we don't have to restrict changes to these; some on the unaffected ones can also be updated, to provide higher chances of researching the high tier items before the game ends.

geist22 commented 1 year ago

Just get the latest build, and "conf" folder will contain the files with current values. Or you can view them in github code browser: https://github.com/mefistotelis/swars/blob/master/conf/cybmods.ini

I think you misunderstood, those are the new values now that the integer overflow is fixed. I'm looking for the values the original game uses, yes the bugged ones. Not sure if I'd still use them with such fancy new options for customization, but I'd at least want to preserve a way to recreate the original experience as close to 100% as possible.

mefistotelis commented 1 year ago

I'm looking for the values the original game uses, yes the bugged ones

Oh, this isn't that easy. The bugged values come in because of fraction computing - if you spend the amount of money equal to ResearchFunding (from the INI file) there is no fractioning, but if the value is not exact that, it goes with:

ResearchGenerated = ResearchFromComputingScientists * MoneyPlayerSetToResearch / ResearchFunding

(this is simplified, but the complete algorithm can be seen in research.c)

Since MoneyPlayerSetToResearch is set by the player, and ResearchFromComputingScientists depends on how many scientists the player has, this can lead to any value between 0 and 4 million / ResearchFunding.

geist22 commented 1 year ago

Yeah I realize I'm in way over my head here. Because the "estimated" bar still uses the old progress from before the rewrite, I think what I'm looking for might actually be in the ASM code.

Let's say 4 scientists is 100% research speed. If you spend money equal to ResearchFunding per 1 day, 4 scientists research any item in exactly 10 days. Back to the previous example of legs v3. Courtesy of the integer overflow, in the original game they need actual funding of around ~4500ish per day to be done in 10 days by 4 scientists. To replicate the research of the original game, we would need to retrieve that exact number, which probably includes decimals, for every item in the list posted above, and put them into ResearchFunding.

I know that these numbers don't exist like that, but would have to be calculated from the operations in the code. I doubt I'll be able to do it.

mefistotelis commented 1 year ago

I'm afraid you'll find out such value fluctuates.

But still, here's something you can experiment with. Command line tool, computes the one day research in new and original way. Requires 4 params, ie:

# ./swars-test.exe 12 10 2000 4000
Scientists=12, PercentPerDay=10, Funding=2000, real_funding=4000
Progress: fixed=6720 original=6720
END

swars-research-points.7z.txt

(remove the .txt extension, it's there to make github happy)

Oh, if you run that from windows cmd and it shows nothing, pipe the tool output to something else ie.

swars-test.exe 12 10 2000 4000 | more
geist22 commented 1 year ago

This is interesting. So if I read this right, a progress of 2560 means it gets done in 10 days by 4 scientists. By running through it backwards I managed to guess all the numbers that give an output of 2560. The numbers change with scientists and funding, but the changes seem to be consistent - everything changes in the same way.

I've made two modified .ini files with the new (old) numbers: cybmods_original.txt weapons_original.txt

I've tested this with the original in DOSBox and the latest build side by side, and all items look like they work exactly the same way as in the original with all the configurations (number of scientists, funding) I've tried. By using these files, purists can essentially keep using the classic research behaviour with this port going forward. Except the displayed number for funding is different. One might get a shock when finding out that Displacertron costs less than a Medikit 🤣

For reference, these are the raw numbers used:

Pulse Laser 11400 Electron Mace 16400 Launcher 23800 Nuclear Grenade 23200 Ion Mine 10800 High Explosive 22400 Long Range Rifle 4400 Satellite Rain 2600 Plasma Lance 20800 Graviton Gun 25500 Persuadertron II 19400 Stasis Field 7600 Chromotap 17600 Displacertron 2000 Cerberus IFF 13800 Trigger Wire 18200 Clone Shield 23200

Legs3 4400 Body3 24400 Brain3 19400 Epidermis2 9400 Epidermis3 8800 Epidermis4 18200

So with this, point 1 from the first post is actually solved. I'll leave this issue open for the time being, because we might want to come up with new ways to rebalance the research using the fixed numbers in the future. I do agree that higher tier items costing less than lower tier items is silly, just wanted to get a way to keep the "original experience", bugged as it may be, preserved for those who want it (myself included).

mefistotelis commented 1 year ago

For the weapons/mods expected to be researched before the last level, we shouldn't increase the sum of all points as they are in the _original files - so the rebalancing should subtract values from lower tier to add to higher tier.

For ones which weren't supposed to be researched anyway (meaning only epidermis and grav gun, I thing), increasing beyond the original sum of points shouldn't be a problem.

There are also a few unused weapons, but as unused (or at least non researchable - the energy shield is in fact used) they don't really matter.

geist22 commented 1 year ago

You want to rebalance research so you get the same amount of research done now as before, but keep the prices of items proportional to their cost?

Excluding the Graviton Gun, adding all items you can normally research adds up to a total of 210'000 + 1'388'000 (new) and 85'000 + 287'200 (old), meaning new research is 2,47 times slower than the original for mods and 4,83 times slower for weapons. Now you can divide the cost of every researchable item by that number:

cybmods_rebalanced.txt weapons_rebalanced.txt

I didn't want to make two different files for EuroCorp/Church (their starting equipment adds up to the same cost), so I've ignored the Persuadertron 2 which only EuroCorp can research. They can recruit more optional scientists during their missions, so it's okay for their research to be a bit more expensive.

mefistotelis commented 1 year ago

Hm, these changes are quite significant. It will lead to the player having better weapons at early levels.

Maybe the change should be non-linear, affecting higher values more. But I don't know, maybe these are ok - I guess this would have to be playtested.

geist22 commented 1 year ago

Yeah, I don't exactly like the look of it either. Because there are a couple of very expensive weapons near the end of the game, some of the early game stuff is now extremely cheap. Though things like Long Range Rifle and Pulse Laser are still cheaper with original game values.

Maybe the change should be non-linear, affecting higher values more.

Probably better. I wouldn't know how to do that though.

mefistotelis commented 1 year ago

I went with more "what I think" rather than mathematical approach:

  1. TIMEGUN, SOULGUN, STASISFLD, PERSUADER2 - almost endgame - can be easily reduced to 25% or less, as they are very expensive and the player doesn't have much time to research them.

  2. CLONESHLD, BEAM, AIRSTRIKE, NUCLGREN, RAP - should not be decreased that significantly, as they are kind of game changers in late game. Still AIRSTRIKE and NUCLGREN are also expensive to use, so research can go to 25%. The use of CLONESHLD may require some encouragement for average players, so can go 25% as well. BEAM, RAP - these shouldn't go below 45% of original research, considering their importance.

  3. LONGRANGE, EXPLMINE - these are also game changers, but in the early/mid game; I'd keep LONGRANGE at 50% original, the explosive can go to 40% as it's expensive to use

  4. EXPLWIRE, CEREBUSIFF, ELEMINE - are not that significant, can go to 20%

  5. MINIGUN, LASER, ELLASER - are not that important to the player, but make him feel progress in early game, also they don't cost much to begin with - can go to 45%

  6. MEDI2, RAZORWIRE, KOGAS, CRAZYGAS, H2HTASER - these are insignificant and can go to 20-25%

What do you think?

weapons_rebalanced-on-feel.txt

EDIT: Now BEAM is twice as expensive as anything else, maybe it should be reduced a bit more.. to 33%?

geist22 commented 1 year ago

Minigun is a real gamechanger at the start of the Church campaign when you only have the Uzi. I wouldn't change it too much from it's old value, if at all. LR Rifle is also important for Church mission 4, though it's already bugged in the original so it can only go up...

I made a draft but then scrapped it because to get the total number down far enough to match the original, the later weapons would have to go down so much compared to the earlier ones that it wouldn't make much of a difference anymore between it and the old, bugged values.

Also there's no need to change Uzi, Persuader or Medi1 - both campaigns have it as starting equipment (lv1 mods too), so you can't research it without cheats.

I still think that softening up the diminishing returns on scientist numbers and amount of funding instead of just changing the prices of items is worth exploring, even if it's a deeper change. As it is now, a big team barely makes a difference compared to the first few ones, and increasing funding beyond a certain point is just wasting lots of money for little gain.

Speaking of diminishing returns, I think the numbers we see here are misleading in an exaggerated way (I did not take diminishing returns into account when calculating the above numbers). Fixed research isn't actually THAT much slower as the numbers make it look like, because diminishing returns only really kicks in hard once you go much higher than the base price, to say below 5 days research time. As a result, old research might not be much faster but only cheaper, because very low base prices means you can keep fast times with little funding, while new research could get similar research times with higher funding that would make more of a difference now, as higher base prices means diminishing returns is much more lenient. It might even be possible to go with the new prices without much rebalance at at all, but I have no idea how this all turns out in practice just from looking at the numbers. This would have to be playtested.

mefistotelis commented 1 year ago

It is a good observation that time is a more problematic resource than money. Maybe instead of decreasing cost, we should decrease the base time to research.

Though I'm not really sure how the average player sees that.. we may very easily create a game only playable by people who have proir knowledge, ie. about banks. When I played the game for a first time, I didn't know how the bank looks like or that you can get money from it. I only robbed banks which were blown up by someone else (typically Unguided), or when I accidentally discovered that there are suitcases dropped by a building. So playing that way, the credits were a struggle.

On the other hand, today you just type a query and can immediately know everything about banks. So maybe the old rules no longer apply.

EDIT: For changing the diminishing returns algorithm - I'm not sure it's a good idea. Rubber banding everyone to similar research generation ensures noone will get stuck.

mefistotelis commented 1 year ago

The more I think about it, the more I come to a conclusion that your _original files are a better starting point. Plasma Lance should be the most expensive to research, and then the points can go down. Early weapons shouldn't be modified, as the early game plays fine.

geist22 commented 1 year ago

I think we shouldn't worry too much about rebalancing gameplay for now - this is basically mod territory, as I see it. A fixed system is in place and we have a way to emulate the behaviour of the original game or make changes as we see fit. Rebalancing is highly subjective and involves personal preference, which changes from user to user, and also requires a good amount playtesting.

Before going off and doing gameplay changes, I think it would be better to concentrate on the foundation and technical aspects, to bring the game itself in a more playable state. If I were to replay SWARS right now, I'd sadly still do it in DOSBox, mostly because of #26, but also #24 and #25, and some minor quality of life stuff. For example, you can switch between windowed and fullscreen while the game is running. From there, there could be the improvements specific to this port, impossible in the original game, such as better zoom, configurable keybinds, smooth and fast camera, high framerate etc., which would elevate the game to the next level and bring new life into it.

If there is demand for rebalancing parts of the gameplay itself, it can always be done later, when the core of the game is mostly finished, basically post-1.0 stuff.

As said above, I've interpreted the numbers in a wrong way. Fixed resarch is not actually 2,47 (mods) or 4,83 (weapons) slower. What those numbers mean is that the total amount of research progress required to research everything is 2,47 and 4,83 times higher. But because the original has stupidly cheap research prices for many weapons, a ton of time (and money) gets lost due to diminishing returns. Because research time depends heavily on scientists and funding, I can't tell how much difference there actually is in practice without playing through the full game to test it. And I don't want to do such things half-heartedly like fast forwarding missions with Alt+C cheat, because getting certain weapons one mission earlier or later can make a huge difference (particularly the Plasma Lance and Launcher). But what good would it do if I found a new configuration I like? Other people might not like it, because balancing things is just subjective. So I choose to go with the default, original behaviour, because that's inarguably "how the game works", bugged as it may be.

For now, I think we can just continue to use the same numbers that the original game uses. If someone comes along and says they really don't want to play like that, they have the option to edit the config files themselves.

mefistotelis commented 1 year ago

If I were to replay SWARS right now, I'd sadly still do it in DOSBox

You may want to take a look at SW Premium then, it was recently discussed here: https://github.com/mefistotelis/swars-re-helpers/issues/1

We definitely have a different view at which issues are important.

balancing things is just subjective

True. But stating that, you game me an idea. Though subjective from a distance, there are design rules which we can define and impose, like:

Based on such statements, it should be possible to prepare automated tests for the research functionality/balance.

geist22 commented 1 year ago

SW Premium

Are you talking about that japanese Win95 version? I've read a bit of that thread and will probably check it out sometime in the future. But I'll keep my expectations in check, because I'm on Windows 10 and after 7 they seem to have removed native compatibility to early Windows programs (95-XP era), so games from that time are now very hard to run, most require various fanmade patches and mods to run at all and still have issues. Games from the Win95-XP era have been an absolute nightmare for me since I've switched away from 7.

mefistotelis commented 1 year ago

True. On win10+ DOSBox might be less problematic than native version.

geist22 commented 1 year ago

Yeah, I've just tried it, the installation flat out refuses to start at all even with the usual workarounds. Disappointing but not unexpected. Would probably have to run this in a VM, at which point it's easier to just use the DOS version with DOSBox.

Moburma commented 1 year ago

The windows version is sadly not very good and inferior to the DOS original. I think the installer is 16 bit, I got it working by installing it in an old Windows VM and copying the files back (it uses a cfg file to tell it where to look for the installed files and CD). Even then I couldn't get the game to work properly on Windows 11. Using DGVoodoo It will load the menus fine (they run very fast though), but it crashes as soon as it goes in-game. In the end I had to run it in a PCEM Windows 95 VM. This works fine, but exposes the fact it's somewhat cut down and things like MIDI music are totally broken in it as I think the Japanese team didn't understand how it was supposed to work (it just plays all the time when turned on). I wrote more on it here: https://tcrf.net/Syndicate_Wars_(DOS)/Japanese_Version

geist22 commented 1 year ago

That is disappointing to hear. I would have expected this version to fix major issues from the DOS version (like the speed), not add new issues on top of them. @mefistotelis remains our only hope to bring SWARS up to modern standards. I often look through parts of the code, but most of it just looks like chinese to my illiterate brain, so I am grateful for all the hard work he does on this project.

https://tcrf.net/Syndicate_Wars_(DOS)/Japanese_Version

Hey, I remember that "new" sound from the Electron Mace. That's exactly how the Electron Mace sounded in the german DOS version. The sound for no energy sounds familiar too, though I haven't played my german version for two decades so it might just be my imagination.

Moburma commented 1 year ago

Ahh you,re right. I'd not sat down and looked deeply into the German version before, it uses the same base set of sounds as the Windows version, only with the adverts still intact. Weirdly the Sound.dat file was made on the 11th August rather than the 8th like the English version but all the changes are there, new Electron Mace and energy drained sounds, and the mech.wav growling sound is there too.

geist22 commented 8 months ago

Just finished a full EuroCorp campaign with the new research. I tried to avoid my usual powergaming as much as possible to try and see the perspective of less experienced players, though I'm probably still biased.

Things I did NOT do:

  1. Sell Uzi's of agent 5-8 at the start
  2. Buy a Persuadertron and persuade every civilian in the first few levels for an extra ~30k credits/mission
  3. Pick up every possible High Explosive to sell them (there are 6 in the 2nd mission!)
  4. Sell weapons I actively used with the intention of reaquiring them in the next mission from slain enemies
  5. Persuade Drennan and the other 2 scientists in mission 13 (it's implied they are EuroCorp personnel so it doesn't really make sense you can do that, especially Drennan himself seems like an oversight)
  6. Do missions out of order to unlock important research ASAP (Launcher and Plasma Lance in particular)

Things I DID do:

  1. Complete all missions in the order they are offered
  2. Rob every bank & kill every NPC that drops briefcases with credits
  3. Do all optional stuff (clearing out enemy bases not required for the mission, etc.)
  4. Persuade all scientists except in mission 13
  5. Sell 4 copies of Pulse Laser and Electron Mace each for most of the missions (primarily used Miniguns and later LR Rifles)
  6. Replay a mission if scientists died

Because you can't do "fun stuff" like researching the Graviton Gun anymore, there is no reason to hoard credits and you can spend as much for research as makes sense before diminishing returns make additional gains nearly non-existent. I don't know of anyone else who likes to get 4 Graviton Guns in a legit game without cheating, so I consider this an exception and assume money is to be spent liberally.

Observations:

  1. For the first 3 missions (01, 02a, 02b), research is stalled due to lack of credits. Assuming no powergaming, this also happens in the original, but there you'll get more research done with what little money you have. Not really a significant impact.
  2. Starting with mission number 03 (Geneva), money is no longer an issue for the rest of the game, assuming you rob all banks and pick up all briefcases with credits.
  3. I've had all body mods researched shortly before mission 11, which is 3 missions slower than what I did in the original game. In the original, I usually upgraded my agents from lv1 mods straight to lv3 (except for body), because research is so fast. This time I didn't skip any upgrades and bought everything as it was unlocked. Progression felt more natural.
  4. I've spent around 40k for mods and 70k for weapons per day, increased to 200k per day for weapons near the end. In the original, I'm usually spending 20k for mods and 30k for weapons. I've reached Colombo with over 6M credits, but I felt spending more on research didn't make a tangible difference because it would have almost no effect on research times due to diminishing returns.
  5. It's possible to research the Plasma Lance in 4 days with around 310k/day funding, so even if you don't get the ones in mission 17, it's still possible to guarantee it researched for mission 20 with the minimum of 2 days mission time. I consider reaching mission 20 without the Plasma Lance researched a softlock (though there's this weird exploit where you can return to the menu after a failed attempt for free research time, this is probably a bug but still a way to get out of softlocks due to missing research). I wouldn't want to play mission 19 without it, though.
  6. At Colombo, I've had 4 weapons left unresearched (Chromotap, Displacertron, Cerberus IFF and Trigger Wire). I'm not sure if it's at all possible to reach mission 20 with everything researched. In my last playthrough of the original I've had 3 of the same weapons left, though I've skipped missions 3 and 10. Because some of those researches are unlocked very late, I don't know how much would be left doing all missions in order. I'd assume around 1, maybe 2 weapons left.

Conclusion: Except for the very early game, which is also a problem in the original, it is very playable. Mod progression actually felt better. I don't really believe that any balance changes are necessary and we could just leave it as it is. My main concern is reaching Colombo with quite a few weapons left unresearched.

Because there is a much larger variation in prices now, research funding requires frequent manual intervention (in the original, I could just set it to 20k for mods, 30k for weapons and forget about it). This can cause a loss of possible research progress when a relatively cheap item (e.g. Automedikit) finishes, and auto research selects a much more expensive item as the next one, but you can't adjust the funding because you're on a mission. A possible solution for this could be the ability to dynamically assign funds. Instead of a fixed value in credits, you could set it to a percentage of the item you're currently researching, which would automatically adjust with new research.

I'll probably do the Church campain in the near future too. From my experience it was always easier to research with the Church even with fewer scientists. I'm particularly curious about how the LR Rifle "requirement" for mission 4 will turn out.

geist22 commented 8 months ago

Alright, Church time. Same rules as above.

The Church can get a total of 16 scientists, compared to 32 (or 31? not quite sure) for EuroCorp. They accumulate slowly, so you have to spend more money to compensate. I've basically lived from bankrob to bankrob and wasn't comfortable with my credit balance until after mission 11. Also, some of the scientists are tricky to get and may require multiple tries until RNG shines in your favor, in particular mission 08 (Johannesburg), and to a lesser degree mission 18. With no missions for scientists and money feeling much tighter, at least in the first half of the campaign, getting every single one of them is that much more important.

Church gets the important weapons sooner. I've had LR Rifle at mission 5 and Launcher during mission 8. I've spend less on mods and more on weapons this time, and reached Colombo with only one weapon left unresearched. For the past couple of missions I went nearly all-in on funding, so having everything researched at Colombo probably requires replaying missions every time your mission time is only 2 or 3 days and hope for better RNG.

Talking about mission time, it seems to be random from 2 to 5 days. The game adds hours to it, but does it actually matter? If you have two missions with 2 days and 12 hours each, will you get a third day for your research from the second mission, or are hours just for show and the game discards them? The fact that you can reload a save after getting 2-3 days of mission time, replay the mission, and get 4 or 5 days suggests mission time is random. But does this work for all missions, or does the game try to enforce a certain amount of average time throughout a campaign? I have often though about how to lessen the impact of RNG, and if it would make sense to change mission time from 2-5 days to 3-4 days instead.

Personally, I believe that if you go hard on research funding, to the point of being nearly broke most of the time, you should have everything researched by the time you reach Colombo. If that could be guaranteed, then the restart exploit in that mission could be fixed with good conscience. A problem with that is that research for weapons is never idle, you always have something to research, and if you skimp just a little during the first few missions, it will snowball and you're already stuck in a situation that can't be recovered from no matter how much you spend, thanks to diminishing returns.

Moburma commented 7 months ago

I completed the Church campaign. I don't have an original game baseline to compare to, but balance wise it was manageable. I got LR rifles just in time early on, and didn't have much difficulties with research throughout. I didn't get all the scientists, I must have got about 13 or 14, but due to working them to the bone I had lots of deaths. I didn't save scum to avoid the deaths, and probably averaged around 7 or 8 of them working through the game, I ended up with only 7 left. By Columbo I had 5 things left to research, but none of them I really wanted. Ended up with huge amounts of money as I robbed every bank. I'd classifiy this as above-average play (don't laugh) and I was comfortably able to win from a research perspective with a couple of moments of worry around upgrading the to the next weapons tier in time.

geist22 commented 7 months ago

When it comes to having the technological edge over your enemies, Church definitely feels much easier than EuroCorp, which sometimes made me feel behind (particularly the middle missions where the game likes to throw more and more flying vehicles at you). Early LR Rifle and Launcher does that. I usually try to keep my use of the LR Rifle to a minimum, because that weapon is just so damn overpowered. But many of the later Church missions were challenging enough that I had to fall back to it frequently.

Going above 10-12ish scientists barely does anything because of diminishing returns, so you can let them die without too much worry (I'm a perfectionist though). Below that, deaths are pretty harsh in my opinion, and you have to spend a lot of additional credits to make up for the lost progress.

Also update on mission time: I previously mentioned it as random 2-5 days, but it's actually 1-6 days as far as I can tell. Seems to be randomized for every mission separately.

mefistotelis commented 7 months ago

Also update on mission time

Here's how the city time (CityDays and CityHours) is randomized; mission time (Days and Hours) is increased by the city time. No idea why the game complicates things by using 3 random values. I mean, it makes distribution of probability less even- it's less probable to get 0 in 2 random draws than to get it in a single draw. But then the additional draw for hours? We really want to decrease a probability of getting 1 day, I guess. Though I would program that differently.

    randtime = LbRandomAnyShort() % 72 + 15;
    last_mission_status->CityDays = randtime / 24;
    last_mission_status->CityHours = randtime % 24;
    last_mission_status->CityDays += LbRandomAnyShort() % 2 + 1;
    last_mission_status->CityHours += LbRandomAnyShort() % 24;
    if (last_mission_status->CityHours > 23)
    {
      last_mission_status->CityDays++;
      last_mission_status->CityHours -= 24;
    }
    last_mission_status->Days += last_mission_status->CityDays;
    last_mission_status->Hours += last_mission_status->CityHours;
    if (last_mission_status->Hours > 23)
    {
      last_mission_status->Days++;
      last_mission_status->Hours -= 24;
    }
geist22 commented 2 days ago

I've been attempting to implement an option to enable the classic research by expanding the current implementation. But it seems that any changes to mod_defs[] and weapon_defs[] in cybmod.c/weapon.c will mess up everything.

@mefistotelis is there no easy way to modify these?

I've tried adding an additional column which would store the numbers, but even without using it the other numbers change and show unexpected values. https://github.com/geist22/swars/tree/classic_research_only

mefistotelis commented 2 days ago

But it seems that any changes to mod_defs[] and weapon_defs[] in cybmod.c/weapon.c will mess up everything.

Size of struct ModDef is hard-coded in the assembly. Like most structs, you can't change it until it's only used in C.

To workaround that, I added additional struct ModDefAdd which contains the fields I want to add: https://github.com/swfans/swars/blob/master/src/cybmod.h#L65

So, you can modify that Add struct - it is only used from C, so its size can be increased. It exists for weapons as well.

geist22 commented 2 days ago

Size of struct ModDef is hard-coded in the assembly.

I see. I will try and see if I can get it to work using the Add struct.

geist22 commented 2 days ago

I've managed to implement it:

If you want to use this, I can open a PR.