Opened 2 years ago

Closed 11 months ago

#6521 closed defect (fixed)

Allow to set the biome with the autostart command

Reported by: Langbart Owned by: Freagarach
Priority: Must Have Milestone: Alpha 27
Component: Core engine Keywords:
Cc: Patch: Phab:D4976

Description (last modified by Langbart)

issue

The -autostart-seed=SEED flag allows a specific random map to be loaded, this is great for testing. The changes made with commit [26584] now also load different biomes. This forces you to load the same map multiple times to get the specific seed/ biome you want to test.

to reproduce

  • Choose a random map that has several biomes, e.g., Mainland.
  • Start this map with the -autostart-seed flag from the command line, e.g.
    binaries/system/pyrogenesis -conf=mod.enabledmods:"public" -autostart="random/mainland" -autostart-seed=100
    
  • Close 0 A.D. and run the same command again, usually a different biome will appear.

possible solution

Add a -autostart-biome flag to the command line.

  • source/ps/GameSetup/GameSetup.cpp

    a b bool Autostart(const CmdLineArgs& args)  
    965965            CStr num = args.Get("autostart-players");
    966966            numPlayers = num.ToUInt();
    967967        }
     968        // Set biome if wanted
     969        if (args.Has("autostart-biome"))
     970        {
     971            CStr biome = args.Get("autostart-biome");
     972            Script::SetProperty(rq, settings, "Biome", biome);
     973        }
    968974        // Set up player data
    969975        for (size_t i = 0; i < numPlayers; ++i)
    970976        {
  • tested with the following command
    binaries/system/pyrogenesis -conf=mod.enabledmods:"public" -autostart="random/mainland" -autostart-seed=100 -autostart-biome="generic/nubia"
    

related ticket

Change History (6)

comment:1 by Freagarach, 2 years ago

Milestone: Alpha 26Backlog

comment:2 by Langbart, 2 years ago

Description: modified (diff)

link to related ticket

comment:3 by Langbart, 15 months ago

Priority: Should HaveMust Have
  • much needed for comparing different Alpha versions on the same map

comment:4 by Langbart, 13 months ago

Description: modified (diff)
Milestone: BacklogAlpha 27
  • Adding a code snippet for a possible solution from Phab:D4117 to fix the problem

comment:5 by Freagarach, 13 months ago

Patch: Phab:D4976

comment:6 by Freagarach, 11 months ago

Owner: set to Freagarach
Resolution: fixed
Status: newclosed

In 27692:

Allow to set the biome with the autostart command.

Basically a patch by: @wraitii
Differential revision: https://code.wildfiregames.com/D4976
Comments by: @bb, @sera
Accepted by: @Langbart
Fixes #6521

Note: See TracTickets for help on using tickets.