Using log command in a non-replay game

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.
Post Reply
User avatar
Kyran
Posts: 499
Joined: Sat Dec 31, 2011 5:19 pm
Location: Australia
Contact:

Using log command in a non-replay game

Post by Kyran »

I have an idea of how to make the Ai better at building defensively. I would like to be able to use Log in normal games for the Ai.

Code: Select all

--       _________ __                 __
--      /   _____//  |_____________ _/  |______     ____  __ __  ______
--      \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
--      /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \ 
--     /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
--             \/                  \/          \//_____/            \/ 
--  ______________________                           ______________________
--                        T H E   W A R   B E G I N S
--         Stratagus - A free fantasy real time strategy game engine
--
--	ai_zoisite.lua - Define the Zoisite AI.
--
--	(c) Copyright 2013 by Kyran Jackson
--
--      This program is free software; you can redistribute it and/or modify
--      it under the terms of the GNU General Public License as published by
--      the Free Software Foundation; either version 2 of the License, or
--      (at your option) any later version.
--  
--      This program is distributed in the hope that it will be useful,
--      but WITHOUT ANY WARRANTY; without even the implied warranty of
--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--      GNU General Public License for more details.
--  
--      You should have received a copy of the GNU General Public License
--      along with this program; if not, write to the Free Software
--      Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
--

function AiZoisite()
  Log( { GameCycle = 23, UnitNumber = 19, UnitIdent = "unit-peon", Action = "move", Flush = 1, PosX = 36, PosY = 17, SyncRandSeed = -1317548328 } )
  Log( { GameCycle = 46, UnitNumber = 19, UnitIdent = "unit-peon", Action = "move", Flush = 1, PosX = 36, PosY = 20, SyncRandSeed = -1317548328 } )
  Log( { GameCycle = 59, UnitNumber = 19, UnitIdent = "unit-peon", Action = "move", Flush = 1, PosX = 39, PosY = 25, SyncRandSeed = -308299580 } )
  Log( { GameCycle = 123, UnitNumber = 19, UnitIdent = "unit-peon", Action = "move", Flush = 1, PosX = 41, PosY = 27, SyncRandSeed = 1630030564 } )
  Log( { GameCycle = 137, UnitNumber = 19, UnitIdent = "unit-peon", Action = "move", Flush = 1, PosX = 40, PosY = 28, SyncRandSeed = 1630030564 } )
  Log( { GameCycle = 153, UnitNumber = 19, UnitIdent = "unit-peon", Action = "move", Flush = 1, PosX = 40, PosY = 29, SyncRandSeed = -2117878126 } )
  Log( { GameCycle = 168, UnitNumber = 19, UnitIdent = "unit-peon", Action = "move", Flush = 1, PosX = 40, PosY = 31, SyncRandSeed = -1574881772 } )
  Log( { GameCycle = 195, UnitNumber = 19, UnitIdent = "unit-peon", Action = "move", Flush = 1, PosX = 37, PosY = 33, SyncRandSeed = -1574881772 } )
  Log( { GameCycle = 210, UnitNumber = 19, UnitIdent = "unit-peon", Action = "move", Flush = 1, PosX = 36, PosY = 34, SyncRandSeed = -412685786 } )
  Log( { GameCycle = 224, UnitNumber = 19, UnitIdent = "unit-peon", Action = "move", Flush = 1, PosX = 35, PosY = 36, SyncRandSeed = 2123002316 } )
  Log( { GameCycle = 336, UnitNumber = 19, UnitIdent = "unit-peon", Action = "move", Flush = 1, PosX = 42, PosY = 41, SyncRandSeed = -1256402764 } )
  Log( { GameCycle = 422, UnitNumber = 19, UnitIdent = "unit-peon", Action = "move", Flush = 1, PosX = 41, PosY = 46, SyncRandSeed = -1509236950 } )
  Log( { GameCycle = 458, UnitNumber = 19, UnitIdent = "unit-peon", Action = "move", Flush = 1, PosX = 37, PosY = 48, SyncRandSeed = 900593006 } )
  Log( { GameCycle = 489, UnitNumber = 19, UnitIdent = "unit-peon", Action = "move", Flush = 1, PosX = 41, PosY = 51, SyncRandSeed = 1295402310 } )
  Log( { GameCycle = 558, UnitNumber = 19, UnitIdent = "unit-peon", Action = "move", Flush = 1, PosX = 45, PosY = 55, SyncRandSeed = 1297900092 } )
  Log( { GameCycle = 571, UnitNumber = 19, UnitIdent = "unit-peon", Action = "move", Flush = 1, PosX = 47, PosY = 50, SyncRandSeed = 1810990706 } )
  Log( { GameCycle = 587, UnitNumber = 19, UnitIdent = "unit-peon", Action = "move", Flush = 1, PosX = 44, PosY = 47, SyncRandSeed = 1835471964 } )
  Log( { GameCycle = 598, UnitNumber = 19, UnitIdent = "unit-peon", Action = "move", Flush = 1, PosX = 41, PosY = 45, SyncRandSeed = 1246794144 } )
  Log( { GameCycle = 612, UnitNumber = 19, UnitIdent = "unit-peon", Action = "move", Flush = 1, PosX = 39, PosY = 46, SyncRandSeed = 618169218 } )
  Log( { GameCycle = 636, UnitNumber = 19, UnitIdent = "unit-peon", Action = "move", Flush = 1, PosX = 40, PosY = 53, SyncRandSeed = 1508747336 } )
  Log( { GameCycle = 663, UnitNumber = 19, UnitIdent = "unit-peon", Action = "move", Flush = 1, PosX = 46, PosY = 54, SyncRandSeed = -474202822 } )
  Log( { GameCycle = 678, UnitNumber = 19, UnitIdent = "unit-peon", Action = "move", Flush = 1, PosX = 47, PosY = 53, SyncRandSeed = -792708232 } )
  Log( { GameCycle = 698, UnitNumber = 19, UnitIdent = "unit-peon", Action = "resource-loc", Flush = 1, PosX = 46, PosY = 46, SyncRandSeed = 760583116 } )
end

DefineAi("ai_zoisite", "*", "ai_zoisite", AiZoisite)
Obviously that doesn't work. Any ideas?
04:27 jim4 why haven't you added wc1 support? this project sucks. i'm only going to use freecraft
05:06 jim4 finished wc1 support yet? i've been waiting for 6 years
05:10 jim4 new things scare me
Post Reply