-
Posts
189 -
Joined
-
Last visited
-
Days Won
4
Everything posted by jonbaer
-
Adding a "restart" option (for random maps)
jonbaer replied to jonbaer's topic in Applications and Contributions
Thanks for testing, I saw an old (2+ years) post on this function ... But didn't find the Trac ticket in mention there, I realize the multiplayer scenario for a restart would be a bit more complicated, so maybe the dialog just says you can not restart an multiplayer game or something. I don't play multiplayer enough to know. -
Adding a "restart" option (for random maps)
jonbaer replied to jonbaer's topic in Applications and Contributions
Ah Engine.EndGame(); got me somewhere. What it looks like happens is g_GameAttributes don't actually populate correctly (since the new game leaves me on Observer mode) + it seems that the seed is the same, so it looks like a few things do need to be handled manually. I'd rather this be done proper though (not a hack) should I put this together as a mod or submit a patch? (not 100% sure if a mod would work in this case). EDIT: OK this is exactly what worked for me, will attach patch shortly ... function restartGame() { let playerId = Engine.GetPlayerID(); let gameAttributes = g_GameAttributes; gameAttributes.settings.Seed = Math.floor(Math.random() * Math.pow(2, 32)); Engine.EndGame(); Engine.StartGame(gameAttributes, playerId); Engine.SwitchGuiPage("page_loading.xml", { "attribs": gameAttributes, "isNetworked" : g_IsNetworked, "playerAssignments": g_PlayerAssignments }); } EDIT: Patch attached (YMMV) restart-menu.diff -
Adding a "restart" option (for random maps)
jonbaer posted a topic in Applications and Contributions
Was trying to patch this myself but could not get much beyond the GUI bit. Essential I didn't like the way some random maps were setup initially and wanted to skip resigning/existing and just restart (or more specifically regenerate the map) - but I could not get the game to restart w/ the same attributes using this bit: Engine.StartGame(g_GameAttributes, Engine.GetPlayerID()); Engine.SwitchGuiPage("page_loading.xml", { "attribs": g_GameAttributes, "isNetworked" : g_IsNetworked, "playerAssignments": g_PlayerAssignments }); I realize MP setup would not be ideal for this but is this something that is possible on a single user game or is it just not that simple to restart programmatically like that? Could this option be added @ some point? -
Hi, Is there a way to prevent your dock from being used for trading? Some routes cause deadlocks w/ AI allies - I realize naval warfare w/ AI is not really implemented but is there a way to do the same logic w/ allowing it as a dropsite for allow/disallow for trading?
-
Thought this was a great video to share, (maybe for reference to use on naval formations, etc) ...
-
You were right, a rebuild of spidermonkey seems to have resolved the issue, thanks, much appreciated.
-
Any ideas on what lib(s) I might be missing here? ~/D/0/s/b/w/gcc$ make -j3 ==== Building mocks_real (release) ==== ==== Building network (release) ==== ==== Building tinygettext (release) ==== Creating obj/mocks_real_Release Creating obj/tinygettext_Release Creating obj/network_Release mocks_real.cpp precompiled.h precompiled.h Linking mocks_real dictionary_manager.cpp NetClient.cpp iconv.cpp In file included from ../../../source/network/NetClient.cpp:20: In file included from ../../../source/network/NetClient.h:24: In file included from ../../../source/scriptinterface/ScriptVal.h:21: ../../../source/scriptinterface/ScriptTypes.h:60:10: fatal error: 'jspubtd.h' file not found #include "jspubtd.h" ^ ==== Building lobby (release) ==== Creating obj/lobby_Release precompiled.h 1 error generated. make[1]: *** [obj/network_Release/NetClient.o] Error 1 make: *** [network] Error 2 make: *** Waiting for unfinished jobs.... language.cpp log.cpp plural_forms.cpp Globals.cpp In file included from ../../../source/lobby/Globals.cpp:20: In file included from ../../../source/lobby/IXmppClient.h:21: ../../../source/scriptinterface/ScriptTypes.h:60:10: fatal error: 'jspubtd.h' file not found #include "jspubtd.h" ^ 1 error generated. make[1]: *** [obj/lobby_Release/Globals.o] Error 1 make: *** [lobby] Error 2 po_parser.cpp tinygettext.cpp unix_file_system.cpp precompiled.cpp dictionary.cpp Linking tinygettext /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libtinygettext.a(tinygettext.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libtinygettext.a(precompiled.o) has no symbols
-
You know on a separate side note, is there anything like where you could seed + preview the random map? For example if I wanted to script something to generate a catalog of what the maps would look like under N seed? Just a question + idea, this primarily relates to Archipelago but guess could be any map.
-
Hi, Is there a way to get what the random seed that was used to generate a random map was (so that you could put it into Atlas to regenerate it), is there any function in the console that could tell me this info? - Jon
-
Is there anyway to set a default stance for when you assign a rally point to units coming out of the barracks? For example if you want to set Aggressive / Violent vs. Defensive, I am trying to save time in this step. Or is it only assignable once the unit has been trained? The default of Aggressive isn't what I always want in certain scenarios so just curious ... Thanks.
- 1 reply
-
- 1
-
[Random Maps] Placement of thing
jonbaer replied to wowgetoffyourcellphone's topic in Scenario Design/Map making
I have been playing random/archipelago 2 vs. 2 over and over (major props to whoever coded this gem), I find that the balance it offers in terms of terrain + placement of resources to be the most balanced. -
1x when I play solo, and 25-40x when I have 2 AIs going head to head. Only one thing I wish I could do is swap out the soundtrack during longer form games.
-
Good to know for ships, thanks.
-
Ahh works, thanks good to know.
-
When your CC is at an alarm state new units will auto garrison but how can you do this outside of using an alarm or on another structure (barracks, etc)? Right now it's a manual process after the units are produced to go back and place them inside. Am I missing something?
-
Other pyrogensis based games
jonbaer replied to jonbaer's topic in Introductions & Off-Topic Discussion
I completely understand. The small bit I was trying to figure out while explaining to someone was that the binaries/data/mods/public was the actual ~game~ itself but I think when they attempted to put together a mod w/ a single civ that there were some GUI elements baked from mod=public that needed to be included so they wanted a reference to another packaged game but I hadn't seen any. It is correct in saying that the engine (pyro) @ the moment requires it(?). For example you couldn't just re-distro w/ only han_china civ, etc. correct? -
Hi, Just curious, is there a list of other pyrogenesis based games somewhere (not referring to the mods but other games which are using the same engine) - interested in they way they are packaged / distributed ...
-
Recording / dumping -replay-visual to disk (video)
jonbaer replied to jonbaer's topic in Introductions & Off-Topic Discussion
OK was able to git checkout master to A20 + apply both patches (had to realize it was trying to write to '/media' @ first) but I got <Node deltatime="1"><Position x="583.288391" y="154.026138" z="653.991821"/><Target x="596.535034" y="43.869553" z="798.395630"/></Node> Applied, saved, and ffmpeg the video together, but is there anyway to push the screenshot(s) to another thread so that it is faster to write w/o affecting the game? (I don't know much about the rendering code) ... for the time being I am doing the screen cap w/ Quicktime w/o audio + then post apply a soundtrack (for now). Edit: So I read a pretty good explanation of what the case is ... "The main problem is that glReadPixels is a synchronous call, unlike almost all other OpenGL. The driver/GPU has to lock the framebuffer from modification while the data is being copied out to some temporary buffer which prevents any drawing obviously. That by itself would not be that bad. The really nasty bit is that the OpenGL specification promises that you will have the data you asked for as soon as the call returns (basically an implicit glFinish()). This means that you will have to wait in that call for a full CPU-GPU-CPU roundtrip, which can and does take a while. In contrast, other OpenGL operations don't make such promises and are completely asynchronous. Often you just tell OpenGL to "get stuff done some time in the future"." And then I found a direct to ffmpeg solution @ http://blog.mmacklin.com/2013/06/11/real-time-video-capture-with-ffmpeg/ which seems ideal if I wrote my own function into ps/Util (guessing) ... -
Recording / dumping -replay-visual to disk (video)
jonbaer replied to jonbaer's topic in Introductions & Off-Topic Discussion
I think I actually did patch for the cinematic demo map a while back to take a look at it (not sure if these are the same hacks you are referring to) but in watching this again I realize what the problem is in that there isn't one single solid camera source that would capture an entire session and it wouldn't really make sense on following a center or unit really. What I was hoping for was say you take the random/continent map and fix the camera in between the 2 civic centers and hold it there for watching a replay between many simulations. I was just hoping that maybe I could patch pyrogensis to accept an output directive (--replay-video=) to write a simulation w/ no visual somehow, is your hack on a branch somewhere? Edit: I have found much of what agentx writes about in older posts similar to what I want to attempt to do (it seems that some excellent threads like this one died out), but mainly of the video (gcl, etc) tools he found where what I was looking for. I have been running sims all day and making notes of end games / issues but also making a smaller "0ad-lite" copy w/ just 1 civ (athens) to pass along to a friend to explore. In the end I would like to record all these sims. -
Really off-top but I am curious to know what most people here use to screen capture their battles and trying to understand if it's possible to dump video on OpenGL directly, ie after reading http://stackoverflow.com/questions/7634966/save-opengl-rendering-to-video (I understand the resolution factor, FPS, etc) but can a simulation that was setup w/ 2 AIs be sent directly to video in some fashion?
-
It would be great if birds were figured into the chat system somehow (ie for sending messages) and via new/upgraded tech you got a faster bird + a slower delay, owl -> pigeon -> raven -> eagle ...
-
I noticed http://trac.wildfiregames.com/ticket/4011 and I wanted to comment there but while playing a game today I came across a situation (and have occasionally caught this error before) in which it says "warning: unknown type in garrisonManager undefined" and I think what has happened is I captured a structure which had something special pertaining to that civ (but a bit hard to debug) ... was trying to figure out an easier way to test this situation, any ideas?
-
Yeah I ended up peeking @ PETRA.Config.debug = 3 to see everything. (BTW is there a way to get access to PETRA inside of console for testing?) ... I think my toy approach is to have different "strategies" per Civ and react to different situations per opposite Civ strength/weaknesses, much akin to say what sports analytics does. The machine learning approach where the attack / defend / trading plans change over time sure is interesting. An unbeatable AI will not be fun to play against (as is evident by comments I have seen here) but the challenge of getting to watch it play out is rewarding. I only tried a hack so far where commands came from Neo4J, And using random/continent as a super simple starting base.
-
Yes that is what I was trying to mod out (https://wildfiregames.com/forum/index.php?/topic/20749-thieves-and-spies/) but I think it's might be hard to swap a unit like that where it is "unattackable" from the other side (or at least knowing which Engine command to send). Im still trying to figure out if this disguise is possible, ie clone a unit, have it count as your unit, have it appear as the other civ (since the colors need to line up).
-
Real stupid question, I can't believe I have yet to figure this out after staring @ the code for over an hour but the commands.txt file for -replay and -replay-visual - where does Petra write his commands? Or is it that since the metadata on the AI (seed,diff,etc) is @ start that on the replay it will just run again? I'm trying to understand where that data is stored (or how game state is reconstructed from commands.txt w/ such little info) ...