For a forum that prides itself on trying new things, for the love of all that is novel and interesting, please can we have a new QotM? - Krill

Create an account  

 
Reversing to Orion - project 1oom

The project coder replies:

(September 25th, 2018, 05:35)RefSteel Wrote:
Quote:w - the races now have the appropriate choice of objective at the beginning of a game
Also, if I remember correctly, Meklar were always Xenophobic 100% of the time, I think because of a table overflow issue.  Again, I can dig up more specifics on both the nature of the bug and the actual and intended results if desired.

Took a look at orion.exe again. Pseudocode:
Code:
objective = table[race * 12 + random_from_1_to(10) - 1]

That multiplier 12 should be 10 for 10 table items per race. Probably a copy/paste error from the personality code where 12 is correct. The data past the end of the table is zeroes (which translates to Xenophobic) so races with large index (Meklar, Darlok) get that.

I hadn't noticed the bug it until now. This bug has never existed in 1oom. I'll change it to "a".

(Actually that 12 is 24 due to 16 bit variables.)

Quote:
Quote:m - the player (AI or Human) who commits an oath breaker is not taken as a victim anymore, but as the tresspasser
In v1.3, if you break an agreement with another race (by attack or diplomacy) the AI apparently doesn't think it's a problem.
If an AI breaks an agreement with you, they are more reluctant to make deals with you afterward "because you have broken deals in the past."

In v1.3 the broken treaty is erroneously remembered for both parties which leads to the unfair "because" refusals. The variable "broken_treaty" is used only for this purpose.

Breaking a treaty also lowers a variable "trust" which is used in most diplomacy checks and can be increased only by tributes. The player's trust is consistently modified between Break NAP / Alliance and tributes. The AI treaty break calls also seem correct.

Starting a war (which also breaks treaties) is a bit more complicated. Capturing or destroying a colony results in the AI declaring war and suffering the penalties. Otherwise the warmonger seems to be chosen sensibly.

Stopped blaming the victim in v0.8-26 Classic+ AI.

Quote:
Quote:m - Alkaris and Mrrshans bonus for AI-AI combat corrected to reflect their race bonus
This would be cool to have available as an option; AI Mrrshans are sad enough even under kyrub's patch, and this should help them out.

The AI-AI combat ship weighting code:
Code:
static void game_ai_classic_battle_ai_ai_get_weights(const struct game_s *g, player_id_t pi, int *tbl)
{
   const shipdesign_t *sd = &(g->srd[pi].design[0]);
   const empiretechorbit_t *e = &(g->eto[pi]);
   for (int i = 0; i < e->shipdesigns_num; ++i) {
       tbl[i] += sd->shield * 5;
       tbl[i] += sd->comp * 5;
       tbl[i] += sd->wpnt[0];
       tbl[i] += sd->armor * 10;
       tbl[i] += sd->special[0] * 2;
       tbl[i] += sd->special[1] * 2;
       tbl[i] += sd->special[2] * 2;
       tbl[i] += e->tech.percent[TECH_FIELD_CONSTRUCTION] / 2;
       if ((e->race == RACE_MRRSHAN) || (e->race == RACE_ALKARI)) {
           tbl[i] += 15;
       }
       tbl[i] *= game_num_tbl_hull_w[sd->hull];
   }
}

I suppose the Mrrshan bonus should be 20 instead to match with that factor 5 in computer. But how to reflect the Alkari race bonus? Neither defense not initiative is not directly represented here. Give me numbers and I will use them for the Classic+ AI.

Whoever creates a "Modern" AI option should replace this nonsense with actual autoresolved battles.

Quote:Incredibly, I do have an ancient save handy that shows both bugs (or both versions of the same bug; I'm not sure which...)

Wow, that was quick! This will come handy.

EDIT:

Works in 1oom. I'm not 100% sure, but looks like v1.3 is reading the tech ID for the "environ" check from completed computer tech table regardless of field.

Quote:I found kyrub's notes on this one!

Good find! I'll read the whole thread later. Seems like a "/ 6" would be a fix, but further in the thread:

kyrub Wrote:Actually, it is (3 + best_engine)* constant (multiplier)
so changing only the multiplier will result in a strange behaviour at the retros_level (now it is the opposite: only at retros level AI behaves as intended).

But don't worry, the fix is ready, under testing now.

I wonder what the fix actually is. I'll try to come up with something.

EDIT:

Fixed in v0.8-28 Classic+ AI by changing 3 + best_engine_tech_level to 3 + best_engine_tech_level / 6. Yell if I'm missing something.

RefSteel Wrote:My preference would be to allow any key to continue (or at least space/esc/"c") on screens where "continue" is literally the only possible action, as an improved UI option - but you may already have built some version of that in.

The keys are currenly mostly the same as v1.3. I'll add space as alternative to "c".

EDIT:

v0.8-28 added tech screen a-f keys (1-6 were already there) and space bar as continue / dismiss.

Thanks a lot for sharing the wisdom! We're getting closer to full 1.40m coverage.
Support Free Software projects!
Reply

First thing, since it's been a while since this was mentioned: Thanks very much, 1oom_aaron, for your willingness to stop by here and allow us to talk to the project coder from the forum where we have our MoO players' community. I imagine it would be easier for you guys if we posted all comments/concerns/bugs/etc at the github page for the project, but as that's not a place most of us frequent, I'm glad you're making it possible to help to an extent from here.

(September 25th, 2018, 21:06)1oom_aaron Wrote: I suppose the Mrrshan bonus should be 20 instead to match with that factor 5 in computer. But how to reflect the Alkari race bonus? Neither defense not initiative is not directly represented here. Give me numbers and I will use them for the Classic+ AI.

I guess just upping the Mrrshans to 20 and leaving the Alkari alone makes a kind of sense: Arguably the birds' +15 resembles the effect of reducing their rival's "computer level" by three.

Quote:Whoever creates a "Modern" AI option should replace this nonsense with actual autoresolved battles.

Yeah, clearly.

Quote:Works in 1oom. I'm not 100% sure, but looks like v1.3 is reading the tech ID for the "environ" check from completed computer tech table regardless of field.

Cool! I should note that kyrub was never able to fully solve the problem: I think loading the same save in his patch would have shown "Death" for "Death Spores" and "Improved Terraforming" without the +30 (nor of course the "Environ".)

Quote:Fixed in v0.8-28 Classic+ AI by changing 3 + best_engine_tech_level to 3 + best_engine_tech_level / 6. Yell if I'm missing something.

That sounds like it should work correctly, assuming kyrub's notes are correct.

Quote:v0.8-28 added tech screen a-f keys (1-6 were already there) and space bar as continue / dismiss.

Thanks a lot for sharing the wisdom! We're getting closer to full 1.40m coverage.

You're very welcome! Thanks for working on it in the first place!

Also, I happened to notice some edits I missed from months ago:

(July 19th, 2018, 19:30)1oom_aaron Wrote: EDIT: After taking a closer look, the fleets here are not quite big enough. The saves did help to spot and fix 5 bugs.

The specific situations I'm hoping to debug are:
  1. AI has fleets with high tech and/or (say) 3000+ ships but is afraid to send them to enemy planets.
  2. AI attacks with big fleet but retreats from battle even with overkill numbers and/or tech.

Saves demonstrating #1 would be very helpful. I think I can tackle #2 by editing the OSG-33 save. The save editing process (1oom_saveconv -o t) is rather tedious if the available techs need to be altered.

I don't think I've ever knowingly encountered either bug. If it's still useful to find a save with zillions of AI ships and high technology, I can probably put a game together and send you the save, but I don't know if a bug like that will appear.

That said: Perhaps kyrub was describing the cause of that bug at the link below; if so, from the table posted a few pages back, it looks like you found that bug and fixed it in the Classic+ AI option.

Quote:EDIT 2: If there is interest in forum archaeology then digging up the posts referenced in the unofficial patch post would be a big help in implementing the 1.40m fixes in 1oom.

Some of those are in the thread I linked above. Others are deeper in the unofficial patch thread itself. For instance, "the missiles now use correct to hit bonus against ships with high missile defence" should have linked to here, which also contains (in an EDIT) information about a case where the AI's "confidence" in its ships' fighting power may overflow and be treated as negative if individual ships are too powerful! If desired, I may be able to dredge up the specific posts to which all the links in the post point ... but that would take a while.

[EDIT: Of course not all of them though, which is part of the reason it would take so long. But in particular for "w - early tech decisions corrected to include a fourth decision point for all AI races" I think it may be referring to this short thread. As far as I can tell, kyrub doesn't explain his solution to the bug there (though if this is the right link for that line item, it presumably somehow involves adding a "4th decision point" either after or in between the three described there) but merely describes the bug itself.]
Reply

The project coder replies:

(September 23rd, 2018, 14:41)Jeff Graw Wrote: This talk gives me another idea as well. Perhaps the amount of RP required / turns left could be displayed somewhere on the colony panel (eg. close to "Nova") when uiextra is enabled?

The panel is quite cramped and I'm not sure if it would expose too much data to the player. I assume the next step would be plague... In the "nope" pile for now. Sorry.

(September 26th, 2018, 02:36)RefSteel Wrote: I imagine it would be easier for you guys if we posted all comments/concerns/bugs/etc at the github page for the project, but as that's not a place most of us frequent, I'm glad you're making it possible to help to an extent from here.

It would save wasted effort if the forum overlords were kind enough to create an account for me. Registration attempts have been met with IP blacklisting and the "Contact" button seemingly does nothing. Do I need to pass Voight-Kampff?

GitLab is not good for comments/questions outside bug reports and feature requests. GitLab vs. this forum:
  • does not discriminate based on IP
  • allows anyone to download attachments
  • allows logging in with Google, Twitter, GitHub or Bitbucket accounts (not that I recommend any of those modern day Darloks)
  • has proper bug tracker with optional email notifications and closing automation
  • supports https so passwords are not sent unencrypted
Dealing with this forum is well worth the expertise and ideas you bring to the table.

Quote:I guess just upping the Mrrshans to 20 and leaving the Alkari alone makes a kind of sense: Arguably the birds' +15 resembles the effect of reducing their rival's "computer level" by three.

According to the previously linked thread 1.40m has 20 for both. I'll do the same to minimize differences.

EDIT: Done in v0.8-32.

Quote:Also, I happened to notice some edits I missed from months ago

Sorry about that. Still not quite sure where this forum sits on the edit vs. double post spectrum.

Quote:I don't think I've ever knowingly encountered either bug. If it's still useful to find a save with zillions of AI ships and high technology, I can probably put a game together and send you the save, but I don't know if a bug like that will appear.

That said: Perhaps kyrub was describing the cause of that bug at the link below; if so, from the table posted a few pages back, it looks like you found that bug and fixed it in the Classic+ AI option.

I hope I have fixed the bug. Proper tests are missing, but at this point I'll just wait for someone to actually notice a passive AI with huge fleets and then send the save.

Quote:For instance, "the missiles now use correct to hit bonus against ships with high missile defence" should have linked to here

This post and the confidence thing (related to the above bug) I found and implemented earlier.

Quote:But in particular for "w - early tech decisions corrected to include a fourth decision point for all AI races" I think it may be referring to this short thread.

The "Tech allocation bug" described there is always fixed in 1oom, but IMO it does not fit the enigmatic one-liner. I'll peek at the code again. (For those following at home, it's src/game/game_ai_classic.c:game_ai_classic_turn_p3.)

EDIT: It still eludes me. "w" remains.
Support Free Software projects!
Reply

The project coder replies:

(September 24th, 2018, 02:30)RefSteel Wrote:
Quote:w - AI-AI positive diplomacy problem corrected
I think this was just fixing a problem introduced in a previous version of kyrub's patch.

Looking at the AI thread, I believe this is what the dead link pointed to. It describes AI-AI NAP/alliance oscillation that hinders AI-AI trade. The bug is clearly visible in the code now that it has been pointed out. Fixing it would stabilize alliances and foster trade between the AIs.

However, looking at the bigger picture:
Code:
embryonic stage - included if not in "regressions"
- AI-AI positive diplomacy problem corrected
version 1.40m
- no more eternal alliances for AIs (reverted back to the vanilla version)

I think they talk about the same thing. Implementing the fix would be easy enough but I suppose there was a good reason it was reverted.

In the meantime, v0.8-38 added PBX nums for the Bulrathi bombing decision and missile/torpedo bombard damage. Getting close...
Support Free Software projects!
Reply

The project coder replies:

(September 26th, 2018, 02:36)RefSteel Wrote: I should note that kyrub was never able to fully solve the problem:  I think loading the same save in his patch would have shown "Death" for "Death Spores" and "Improved Terraforming" without the +30 (nor of course the "Environ".)

Getting offtopic, but... Fix: Edit starmap.exe (v1.3 or 1.40m) offset 0x7e112 from DC 02 98 40 to 90 03 98 90.
Support Free Software projects!
Reply

1oom v0.9 has been released. Changes:
  • map scroll speed is adjustable
  • Planets and Fleet screen lists sortable by name/count/bases/etc
  • keys!
    • Alt-X in main menu toggles -uiextra
    • UHJK scroll the map
    • / to search for a planet by name
    • (Ctrl-)1-9 to tag/recall planet
    • space bar for Continue/dismiss/OK/etc
    • 1-5 as portrait click on Races
  • almost 20 bugs fixed, notably:
    • a cause for the infamous 32000 doom stacks indentified and fixed
    • AI scrapped wrong ship designs resulting in obsolete fleets
    • AI II armor bias fixed, resulting in overall better ship designs
    • all but a few of the 1.40m fixes are now implemented
  • doc/pbxin_fixbugs.txt expanded, including fix for waste calculation

Source code: https://gitlab.com/KilgoreTroutMaskReplicant/1oom
Binaries: https://gitlab.com/KilgoreTroutMaskRepli.../tags/v0.9
Homepage: https://kilgoretroutmaskreplicant.gitlab.io/plain-html/

HELP WANTED!

This is it. The final push to v1.0.

The quality you'll get during the long post-v1.0 network multiplayer rewrite instability period depends on how many bugs you manage to catch during the next month or so.

It's time to drop that trusty old DOS EXE and help build a brighter, less clunky future for MOO.
Support Free Software projects!
Reply

I saw at least part of this issue was posted in gitlab by another user earlier today, but in case a complete bug report from here helps too:

*Bug Report*

- Version from 1oom_log.txt: 1oom-v0.9-win32
- Desription of bug effect: On the Planets screen, when I attempt to transfer reserves to one of my worlds, the transfer dialog reads, "Transfer of planetary reserves to [A completely different world that I haven't even explored yet.]" When I do transfer reserves, there is no effect on the planet's listed production. Clicking on the names of my worlds also takes me to unexplored worlds on the command screen instead of to my actual worlds.
- PBX files in use: None; I just ran 1oom_classic_sdl2.exe without passing any other commands.
- Relevant Save File: Attached. You have enough planetary reserves to double the production of either planet.

- Possible Cause: I'll bet that for purposes of clicking on the planets or transferring reserves, the Planets screen is pointing to the raw planet numbers for the entire map instead of just looking at the player's colonies. (Because clicking on my first planet takes me to the far upper left hand star on the map instead, and clicking on the second takes me to another one nearby.)
- I'm still not signed up for gitlab: Sorry....

(Side note: I did not examine this in 0.8, but if the bug existed there as well, this would explain why Jeff Graw couldn't fix a Nova even with maximum reserve contributions at a well-developed poor world: The reserves might just never have gotten there!)


Attached Files
.zip   1oom_save1.zip (Size: 3.73 KB / Downloads: 1)
Reply

The project coder replies:

(October 4th, 2018, 03:01)RefSteel Wrote: - Version from 1oom_log.txt: 1oom-v0.9-win32

I believe the whole line would be "1oom v0.9: main:game ui:classic hw:sdl2 os:win32" which also mentions sdl2 in case that may be relevant.

Quote:- Desription of bug effect: On the Planets screen, when I attempt to transfer reserves to one of my worlds, the transfer dialog reads, "Transfer of planetary reserves to [A completely different world that I haven't even explored yet.]" When I do transfer reserves, there is no effect on the planet's listed production. Clicking on the names of my worlds also takes me to unexplored worlds on the command screen instead of to my actual worlds.

The related bug is fixed. Please try again with v0.9-5 or later.

Quote:- Possible Cause: I'll bet that for purposes of clicking on the planets or transferring reserves, the Planets screen is pointing to the raw planet numbers for the entire map instead of just looking at the player's colonies. (Because clicking on my first planet takes me to the far upper left hand star on the map instead, and clicking on the second takes me to another one nearby.)

That's it. Good hunch.

Quote:(Side note: I did not examine this in 0.8, but if the bug existed there as well, this would explain why Jeff Graw couldn't fix a Nova even with maximum reserve contributions at a well-developed poor world: The reserves might just never have gotten there!)

The bug was introduced in v0.8-32-g3f9f4ef (2018-09-26) which came later.

Thanks for the almost perfect bug report.
Support Free Software projects!
Reply

Here's a minor issue that exists in vanilla (and I believe 1.4), and in 1oom as of 0.9.5:

https://www.dropbox.com/s/e8sahedjgonkja...g.jpg?dl=0

I don't think any kind of replacement for "Destination is out of range X parsecs" needs to be drawn elsewhere, since by the time a player is able to amass a six-design fleet they should understand how fuel range works. It should be fine to simply not display the message at all in this scenario.

Also, a feature request: In addition to 4:3 and 1:1 aspects, how about a stretch to fit option?
Reply

The grumpiest project coder replies:

(October 5th, 2018, 19:51)Jeff Graw Wrote: Here's a minor issue that exists in vanilla (and I believe 1.4), and in 1oom as of 0.9.5:

How many times I have written that bug reports should come with a save? At this point I can only attribute to malice.

Off to find/make a save with 6 designs and range problems...

Quote:It should be fine to simply not display the message at all in this scenario.

I agree.

Quote:Also, a feature request: In addition to 4:3 and 1:1 aspects, how about a stretch to fit option?

_sdl1 calls this "Off".
Support Free Software projects!
Reply



Forum Jump: