Skip to content

Commit

Permalink
Generate some more complex snapshots using neworigins
Browse files Browse the repository at this point in the history
In order to make sure that some of the work I am doing around file
output works correctly, I wanted to make sure I had some neworigins
snapshots including the quest system which the standard snapshots
don't have.  This checkin includes those snapshots to the point that
quests have been created on turn 13.

This also updates the scripts to run them so that both sets of
snapshots will be run to validate the tests.
  • Loading branch information
jt-traub committed Oct 11, 2023
1 parent 1194a91 commit c8df845
Show file tree
Hide file tree
Showing 19 changed files with 834 additions and 59 deletions.
42 changes: 42 additions & 0 deletions snapshot-tests/neworigins_turns/new-turn.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

curTurn=$(< ./turn)
nextTurn=$((curTurn + 1))

if [[ ! -f ../../neworigins/neworigins ]]; then
echo "Please build the neworigins executable before trying to create a new snapshot turn."
exit 1
fi

if [[ ! -d turn_$nextTurn ]]; then
mkdir turn_$nextTurn
cp turn_$curTurn/game.out turn_$nextTurn/game.in
cp turn_$curTurn/players.out turn_$nextTurn/players.in
cp turn_$curTurn/template.3 turn_$nextTurn/orders.3
fi

echo "Modify the input orders for turn_$nextTurn to test desired changes"
echo "When that is complete, rerun this script."

diff turn_$curTurn/template.3 turn_$nextTurn/orders.3 &> /dev/null
if [[ $? = 0 ]];
then
echo "No order changes have occured. Exiting."
exit 0
fi

echo "Running turn to produce new output"
cd turn_$nextTurn
../../../neworigins/neworigins run > engine-output.txt

if [[ $? != 0 ]]; then
echo "Game engine crashed while generating turn. Turn not generated."
cat engine-output.txt
rm -f *.out
rm -f template.*
rm -f report.*
rm -f times.*
rm -f engine-output.txt
fi

echo "$nextTurn" > ../turn
1 change: 1 addition & 0 deletions snapshot-tests/neworigins_turns/turn
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
13
49 changes: 49 additions & 0 deletions snapshot-tests/neworigins_turns/turn_0/engine-output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Atlantis Engine Version: 5.2.5 (beta)
NewOrigins, Version: 3.0.0 (beta)

Saved Game Engine Version: 5.2.5 (beta)
Saved Rule-Set Version: 3.0.0 (beta)
Reading the regions...
Setting up the neighbors...
Setting Up Turn...
Reading the Gamemaster File...
Reading the Orders File...
QUITting Inactive Factions...
Running the Turn...
Running FIND Orders...
Running ENTER/LEAVE Orders...
Running PROMOTE/EVICT Orders...
Running Combat...
Running STEAL/ASSASSINATE Orders...
Running GIVE Orders...
Running ENTER NEW Orders...
Running EXCHANGE Orders...
Running DESTROY Orders...
Running PILLAGE Orders...
Running TAX Orders...
Running GUARD 1 Orders...
Running Magic Orders...
Running SELL Orders...
Running BUY Orders...
Running FORGET Orders...
Mid-Turn Processing...
Running QUIT Orders...
Removing Empty Units...
Running WITHDRAW Orders...
Running Consolidated Movement Orders...
Running Teach Orders...
Running Month-long Orders...
Running Economics...
Running Teleport Orders...
Running Transport Orders...
Assessing Maintenance costs...
Post-Turn Processing...
Players have visited 0 regions; 96 unvisited.
Writing world events...
Writing the Report File...
...
Writing order templates...
...
Writing Playerinfo File...
Removing Dead Factions...
done
49 changes: 49 additions & 0 deletions snapshot-tests/neworigins_turns/turn_1/engine-output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Atlantis Engine Version: 5.2.5 (beta)
NewOrigins, Version: 3.0.0 (beta)

Saved Game Engine Version: 5.2.5 (beta)
Saved Rule-Set Version: 3.0.0 (beta)
Reading the regions...
Setting up the neighbors...
Setting Up Turn...
Reading the Gamemaster File...
Reading the Orders File...
QUITting Inactive Factions...
Running the Turn...
Running FIND Orders...
Running ENTER/LEAVE Orders...
Running PROMOTE/EVICT Orders...
Running Combat...
Running STEAL/ASSASSINATE Orders...
Running GIVE Orders...
Running ENTER NEW Orders...
Running EXCHANGE Orders...
Running DESTROY Orders...
Running PILLAGE Orders...
Running TAX Orders...
Running GUARD 1 Orders...
Running Magic Orders...
Running SELL Orders...
Running BUY Orders...
Running FORGET Orders...
Mid-Turn Processing...
Running QUIT Orders...
Removing Empty Units...
Running WITHDRAW Orders...
Running Consolidated Movement Orders...
Running Teach Orders...
Running Month-long Orders...
Running Economics...
Running Teleport Orders...
Running Transport Orders...
Assessing Maintenance costs...
Post-Turn Processing...
Players have visited 1 regions; 95 unvisited.
Writing world events...
Writing the Report File...
...
Writing order templates...
...
Writing Playerinfo File...
Removing Dead Factions...
done
49 changes: 49 additions & 0 deletions snapshot-tests/neworigins_turns/turn_10/engine-output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Atlantis Engine Version: 5.2.5 (beta)
NewOrigins, Version: 3.0.0 (beta)

Saved Game Engine Version: 5.2.5 (beta)
Saved Rule-Set Version: 3.0.0 (beta)
Reading the regions...
Setting up the neighbors...
Setting Up Turn...
Reading the Gamemaster File...
Reading the Orders File...
QUITting Inactive Factions...
Running the Turn...
Running FIND Orders...
Running ENTER/LEAVE Orders...
Running PROMOTE/EVICT Orders...
Running Combat...
Running STEAL/ASSASSINATE Orders...
Running GIVE Orders...
Running ENTER NEW Orders...
Running EXCHANGE Orders...
Running DESTROY Orders...
Running PILLAGE Orders...
Running TAX Orders...
Running GUARD 1 Orders...
Running Magic Orders...
Running SELL Orders...
Running BUY Orders...
Running FORGET Orders...
Mid-Turn Processing...
Running QUIT Orders...
Removing Empty Units...
Running WITHDRAW Orders...
Running Consolidated Movement Orders...
Running Teach Orders...
Running Month-long Orders...
Running Economics...
Running Teleport Orders...
Running Transport Orders...
Assessing Maintenance costs...
Post-Turn Processing...
Players have visited 6 regions; 90 unvisited.
Writing world events...
Writing the Report File...
...
Writing order templates...
...
Writing Playerinfo File...
Removing Dead Factions...
done
49 changes: 49 additions & 0 deletions snapshot-tests/neworigins_turns/turn_11/engine-output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Atlantis Engine Version: 5.2.5 (beta)
NewOrigins, Version: 3.0.0 (beta)

Saved Game Engine Version: 5.2.5 (beta)
Saved Rule-Set Version: 3.0.0 (beta)
Reading the regions...
Setting up the neighbors...
Setting Up Turn...
Reading the Gamemaster File...
Reading the Orders File...
QUITting Inactive Factions...
Running the Turn...
Running FIND Orders...
Running ENTER/LEAVE Orders...
Running PROMOTE/EVICT Orders...
Running Combat...
Running STEAL/ASSASSINATE Orders...
Running GIVE Orders...
Running ENTER NEW Orders...
Running EXCHANGE Orders...
Running DESTROY Orders...
Running PILLAGE Orders...
Running TAX Orders...
Running GUARD 1 Orders...
Running Magic Orders...
Running SELL Orders...
Running BUY Orders...
Running FORGET Orders...
Mid-Turn Processing...
Running QUIT Orders...
Removing Empty Units...
Running WITHDRAW Orders...
Running Consolidated Movement Orders...
Running Teach Orders...
Running Month-long Orders...
Running Economics...
Running Teleport Orders...
Running Transport Orders...
Assessing Maintenance costs...
Post-Turn Processing...
Players have visited 11 regions; 85 unvisited.
Writing world events...
Writing the Report File...
...
Writing order templates...
...
Writing Playerinfo File...
Removing Dead Factions...
done
49 changes: 49 additions & 0 deletions snapshot-tests/neworigins_turns/turn_12/engine-output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Atlantis Engine Version: 5.2.5 (beta)
NewOrigins, Version: 3.0.0 (beta)

Saved Game Engine Version: 5.2.5 (beta)
Saved Rule-Set Version: 3.0.0 (beta)
Reading the regions...
Setting up the neighbors...
Setting Up Turn...
Reading the Gamemaster File...
Reading the Orders File...
QUITting Inactive Factions...
Running the Turn...
Running FIND Orders...
Running ENTER/LEAVE Orders...
Running PROMOTE/EVICT Orders...
Running Combat...
Running STEAL/ASSASSINATE Orders...
Running GIVE Orders...
Running ENTER NEW Orders...
Running EXCHANGE Orders...
Running DESTROY Orders...
Running PILLAGE Orders...
Running TAX Orders...
Running GUARD 1 Orders...
Running Magic Orders...
Running SELL Orders...
Running BUY Orders...
Running FORGET Orders...
Mid-Turn Processing...
Running QUIT Orders...
Removing Empty Units...
Running WITHDRAW Orders...
Running Consolidated Movement Orders...
Running Teach Orders...
Running Month-long Orders...
Running Economics...
Running Teleport Orders...
Running Transport Orders...
Assessing Maintenance costs...
Post-Turn Processing...
Players have visited 20 regions; 76 unvisited.
Writing world events...
Writing the Report File...
...
Writing order templates...
...
Writing Playerinfo File...
Removing Dead Factions...
done
59 changes: 59 additions & 0 deletions snapshot-tests/neworigins_turns/turn_13/engine-output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
Atlantis Engine Version: 5.2.5 (beta)
NewOrigins, Version: 3.0.0 (beta)

Saved Game Engine Version: 5.2.5 (beta)
Saved Rule-Set Version: 3.0.0 (beta)
Reading the regions...
Setting up the neighbors...
Setting Up Turn...
Reading the Gamemaster File...
Reading the Orders File...
QUITting Inactive Factions...
Running the Turn...
Running FIND Orders...
Running ENTER/LEAVE Orders...
Running PROMOTE/EVICT Orders...
Running Combat...
Running STEAL/ASSASSINATE Orders...
Running GIVE Orders...
Running ENTER NEW Orders...
Running EXCHANGE Orders...
Running DESTROY Orders...
Running PILLAGE Orders...
Running TAX Orders...
Running GUARD 1 Orders...
Running Magic Orders...
Running SELL Orders...
Running BUY Orders...
Running FORGET Orders...
Mid-Turn Processing...
Running QUIT Orders...
Removing Empty Units...
Running WITHDRAW Orders...
Running Consolidated Movement Orders...
Running Teach Orders...
Running Month-long Orders...
Running Economics...
Running Teleport Orders...
Running Transport Orders...
Assessing Maintenance costs...
Post-Turn Processing...
Players have visited 29 regions; 67 unvisited.

Quest reward: shieldstone x 3.

Quest reward: ironwood x 37.

Quest reward: admantium ring mail x 4.

Quest reward: holy symbol x 1.

Quest reward: mithril x 35.
Writing world events...
Writing the Report File...
...
Writing order templates...
...
Writing Playerinfo File...
Removing Dead Factions...
done
Loading

0 comments on commit c8df845

Please sign in to comment.