Jump to content

howlingflute

Community Members
  • Posts

    59
  • Joined

  • Last visited

Posts posted by howlingflute

  1. post-12995-0-36398500-1313468964_thumb.j

    So I have made a number of changes to my island random map.

    • Underwater Blending (coral and deep water)
    • changed the terrain to look more like Cycladic Archipelago III
    • Mediterranean dirt and rock brush mixtures
    • added patches of dry grass
    • the center island is now broken up into smaller islands depending on the map size (1 at size tiny and up to 4 at the largest size)
    • fewer shipwrecks
    • more fish

    I have attached the new file to this post. Enjoy.

    post-12995-0-52724500-1313468935_thumb.j

    post-12995-0-42882400-1313468946_thumb.j

    Islands.zip

  2. -- We also really need a way to choose the number of players before generating the map in Atlas.

    You can already (this is how I have been testing my map). Under the player settings tab there is a drop down box where you can pick the number of players. Then if you go back to the map settings tab you can use the drop down box for random maps and pick Islands. It should be there if you put the map in the right folder. Then you can change map size, random seed and then click generate map.

    -- I think the grass areas can be less mixed.

    -- Check out the map "Cycladic Archipelago III" for some ideas on how islands can look, specifically terrain blending, the terrains I picked, the trees I used, and how cliffs can look. Check out the map "Sicilia" for more ideas on how cliffs and beaches can look.

    -- I made a new tree-type, "Cretan Date Palm" which would go great with your islands (there are three varieties for your pleasure, clump, short, tall). Check them out. :)

    -- Need some more underwater terrain blending, specifically the black terrain for really deep water.

    -- If you break up the large center island into a couple of smaller islands, I don't see why we couldn't use your script as the "official" Cycladic Archipelago random map in the next release. :worship:

    I looked at the maps you mentioned. They are really great and gave me some new ideas about blending and terrain to use. I think you are right that grass is currently too mixed.

    How many islands were you thinking the center one should be broken into? I had tried just randomly generating other islands at random coordinates but they ended up ending up spaced nicely maybe if I define ahead of time the possible areas and range of angles they can be generated at. I will definitely keep working on this and it would be awesome if you can use this in game once I have made all the necessary changes.

  3. post-12995-0-95480100-1313275899_thumb.j

    I changed the orientation of the buildings so they all face bottom right corner. (If you want the civic centres to all to face the center island comment out line 236 in islands.js that is //angletemple = 0.75*PI;). I made a few other changes inluding:

    • adding some blending to the edges of the shrub patches.
    • more decorative stones.
    • removed the restrictions that straggler trees and decorative stones couldn't be on hills.
    • allow straggler trees to grow closer to the shore and water
    • whales generate further away from islands
    • added more bumps

    I also cleaned up the code a little bit. I have attached the new files below.

    Islands.zip

  4. Very nice. One thing I don't like (and this is the case with the other random maps we have) is the random-facing direction of the starting Civic Centre. It's modeled (as are most buildings) to look best facing toward the bottom right corner of the screen.

    The map itself looks really nice. Some nice blending going on along the shorelines. (y)

    Thanks for the comments. I have attached two images to this post showing my attempts to fix the random facing Civic Centre. One is to use a fixed orientation for all the Civic Centres (so they all point towards the bottom right). The other is so the Civic Centres are oriented towards the center island. I think I like the one where they all are facing the center island because the fixed orientation one looks a bit unnatural but I still could be convinced either way. Both of these ways are a lot better then the way it was before (random orientation). Let me know which way you think looks better.

    Thanks for noticing the shore blending :P. That took 5 painter layers: wet sand, dry sand, dry sand to brush, brush to grass, grass

    I've just forgotten to fix this :P

    I noticed that someone fixed this in the svn today :)

    post-12995-0-94696900-1313207138_thumb.j

    post-12995-0-28887100-1313207153_thumb.j

  5. I really enjoy 0ad so I decided that I would try to contribute. I have created a new random map. It creates one central island surrounded by spoke islands. Players start on the spoke islands. If there are fewer than 6 players the map will have six spoke islands and players will start off on islands as indicated by the chart below. If there are more than 6 players there will be a spoke island for each player.

    0 = empty island

    x = occupied island

    1 pers | 2 pers | 3 pers

    _x_0_ | _x_0_ | _x_0_

    0_0_0 | 0_0_0 | 0_0_x

    _0_0_ | _0_x_ | _x_0_

    4 pers | 5 pers | 6 pers

    _x_x_ | _x_x_ | _x_x_

    0_0_0 | 0_0_x | x_0_x

    _x_x_ | _x_x_ | _x_x_

    The map is intended to model mediteranian islands. Each spoke island has the standard start metal and stone as well as a few trees and other standard starting resources. There may be a few forests as well depending on the map size. The main island has most of the rest of the resources. The sea is populated by fish, whales, and random treasure.

    I like the normal size maps best but all sizes work. I used the Cantabrian Highlands and Latium maps heavily as guides and templates for some parts of the code.

    To install this random map put islands.js and islands.json in the random map folder. In my copy of 0ad I use the following path ~/0ad/binaries/data/mods/public/maps/random

    Please let me know how you like this map and your suggestions. (I am more of a programmer than an artist so would appreciate comments on its artistic aspects). I would love if this random map could eventually become part of 0ad.

    Islands.zip

    post-12995-0-79182300-1313156959_thumb.j

    post-12995-0-50433800-1313157024_thumb.j

    post-12995-0-14548600-1313157032_thumb.j

  6. I encountered a problem when I tried to run the ActorEditor on linux. When trying to run the binary I get the following error:

    ./ActorEditor: error while loading shared libraries: ../../../binaries/system/libAtlasUI.so: cannot open shared object file: No such file or directory

    I also get a similar error when trying to run the ColourTester

    ./ColourTester: error while loading shared libraries: ../../../binaries/system/libAtlasUI.so: cannot open shared object file: No such file or directory

    I am compiling from svn. I get the same runtime errors regardless if I try either of the premake systems (the old default one or the new one).

    running ldd ./ActorEditor gives me the following results

    linux-vdso.so.1 => (0x00007fffa9dff000)

    ../../../binaries/system/libAtlasUI.so => not found

    libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fa9220c7000)

    libc.so.6 => /lib/libc.so.6 (0x00007fa921d43000)

    libm.so.6 => /lib/libm.so.6 (0x00007fa921ac0000)

    /lib64/ld-linux-x86-64.so.2 (0x00007fa9223ee000)

    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007fa9218aa000)

    I tried changing the LD_LIBRARY_PATH variable to include ~/0ad/binaries/system but it didn't help. The the libary libAtlasUI.so does exist in ~/0ad/binaries/system so I don't know why I am getting this runtime error.

  7. Thanks for the response. Its too bad that you can't edit the state of the game directly at the moment. Would have been nice to be able to give myself resources :P. Since there is nothing about console commands on the wiki that is correct I searched the code and found a few commands that work in the console.

    There were two locations for script bindings (that I could find) ScriptGlue.cpp and ScriptFunctions.cpp. I copied the relevant parts of each file below

    Let me know if there are any other locations that I missed. Thanks.

    The following were found in ScriptGlue.cpp and work directly in the console without a prefix. I would recommned not using endGame() as it will end your game but also with a core dump. Also note some of these commands require you to be running a debug version of the game.

    	// Profiling
    JS_FUNC("startXTimer", StartJsTimer, 1)
    JS_FUNC("stopXTimer", StopJsTimer, 1)

    // Game Setup
    JS_FUNC("endGame", EndGame, 0)

    // VFS (external)
    JS_FUNC("buildDirEntList", JSI_VFS::BuildDirEntList, 1)
    JS_FUNC("getFileMTime", JSI_VFS::GetFileMTime, 1)
    JS_FUNC("getFileSize", JSI_VFS::GetFileSize, 1)
    JS_FUNC("readFile", JSI_VFS::ReadFile, 1)
    JS_FUNC("readFileLines", JSI_VFS::ReadFileLines, 1)
    JS_FUNC("archiveBuilderCancel", JSI_VFS::ArchiveBuilderCancel, 1)

    // Misc. Engine Interface
    JS_FUNC("exit", ExitProgram, 0)
    JS_FUNC("isPaused", IsPaused, 0)
    JS_FUNC("setPaused", SetPaused, 1)
    JS_FUNC("setCursor", SetCursor, 1)
    JS_FUNC("getFPS", GetFps, 0)
    JS_FUNC("getGUIObjectByName", GetGUIObjectByName, 1)

    // Miscellany
    JS_FUNC("buildTime", GetBuildTimestamp, 0)
    JS_FUNC("dumpHeaps", DumpHeaps, 0)



    { "console" , GLOBAL_CONSOLE, JSPROP_PERMANENT|JSPROP_READONLY, JSI_Console::getConsole, 0 },
    { "gameView" , 0, JSPROP_PERMANENT|JSPROP_READONLY, GetGameView, 0 },
    { "renderer" , 0, JSPROP_PERMANENT|JSPROP_READONLY, GetRenderer, 0 },

    The following commands work with Engine prefix and were found in ScriptFunctions.cpp. For example to change the simulation rate of the game you would use the command

    Engine.SetSimRate(2)

    	// GUI manager functions:
    scriptInterface.RegisterFunction<CScriptVal, &GetActiveGui>("GetActiveGui");
    scriptInterface.RegisterFunction<void, std::wstring, CScriptVal, &PushGuiPage>("PushGuiPage");
    scriptInterface.RegisterFunction<void, std::wstring, CScriptVal, &SwitchGuiPage>("SwitchGuiPage");
    scriptInterface.RegisterFunction<void, &PopGuiPage>("PopGuiPage");

    // Simulation<->GUI interface functions:
    scriptInterface.RegisterFunction<CScriptVal, std::wstring, CScriptVal, &GuiInterfaceCall>("GuiInterfaceCall");
    scriptInterface.RegisterFunction<void, CScriptVal, &PostNetworkCommand>("PostNetworkCommand");

    // Entity picking
    scriptInterface.RegisterFunction<std::vector<entity_id_t>, int, int, &PickEntitiesAtPoint>("PickEntitiesAtPoint");
    scriptInterface.RegisterFunction<std::vector<entity_id_t>, int, int, int, int, int, &PickFriendlyEntitiesInRect>("PickFriendlyEntitiesInRect");
    scriptInterface.RegisterFunction<std::vector<entity_id_t>, std::string, bool, bool, &PickSimilarFriendlyEntities>("PickSimilarFriendlyEntities");
    scriptInterface.RegisterFunction<CFixedVector3D, int, int, &GetTerrainAtPoint>("GetTerrainAtPoint");

    // Network / game setup functions
    scriptInterface.RegisterFunction<void, &StartNetworkGame>("StartNetworkGame");
    scriptInterface.RegisterFunction<void, CScriptVal, int, &StartGame>("StartGame");
    scriptInterface.RegisterFunction<void, std::wstring, &StartNetworkHost>("StartNetworkHost");
    scriptInterface.RegisterFunction<void, std::wstring, std::string, &StartNetworkJoin>("StartNetworkJoin");
    scriptInterface.RegisterFunction<void, &DisconnectNetworkGame>("DisconnectNetworkGame");
    scriptInterface.RegisterFunction<CScriptVal, &PollNetworkClient>("PollNetworkClient");
    scriptInterface.RegisterFunction<void, CScriptVal, &SetNetworkGameAttributes>("SetNetworkGameAttributes");
    scriptInterface.RegisterFunction<void, int, std::string, &AssignNetworkPlayer>("AssignNetworkPlayer");
    scriptInterface.RegisterFunction<void, std::wstring, &SendNetworkChat>("SendNetworkChat");
    scriptInterface.RegisterFunction<std::vector<CScriptValRooted>, &GetAIs>("GetAIs");

    // Misc functions
    scriptInterface.RegisterFunction<std::wstring, std::wstring, &SetCursor>("SetCursor");
    scriptInterface.RegisterFunction<int, &GetPlayerID>("GetPlayerID");
    scriptInterface.RegisterFunction<std::wstring, &GetDefaultPlayerName>("GetDefaultPlayerName");
    scriptInterface.RegisterFunction<void, std::string, &OpenURL>("OpenURL");
    scriptInterface.RegisterFunction<void, &RestartInAtlas>("RestartInAtlas");
    scriptInterface.RegisterFunction<bool, &AtlasIsAvailable>("AtlasIsAvailable");
    scriptInterface.RegisterFunction<CScriptVal, VfsPath, &LoadMapSettings>("LoadMapSettings");
    scriptInterface.RegisterFunction<CScriptVal, &GetMapSettings>("GetMapSettings");
    scriptInterface.RegisterFunction<void, entity_id_t, &CameraFollow>("CameraFollow");
    scriptInterface.RegisterFunction<void, entity_id_t, &CameraFollowFPS>("CameraFollowFPS");
    scriptInterface.RegisterFunction<entity_id_t, &GetFollowedEntity>("GetFollowedEntity");
    scriptInterface.RegisterFunction<bool, std::string, &HotkeyIsPressed_>("HotkeyIsPressed");
    scriptInterface.RegisterFunction<void, std::wstring, &DisplayErrorDialog>("DisplayErrorDialog");
    scriptInterface.RegisterFunction<CScriptVal, &GetProfilerState>("GetProfilerState");

    // User report functions
    scriptInterface.RegisterFunction<bool, &IsUserReportEnabled>("IsUserReportEnabled");
    scriptInterface.RegisterFunction<void, bool, &SetUserReportEnabled>("SetUserReportEnabled");
    scriptInterface.RegisterFunction<std::string, &GetUserReportStatus>("GetUserReportStatus");
    scriptInterface.RegisterFunction<void, std::string, int, std::wstring, &SubmitUserReport>("SubmitUserReport");

    // Development/debugging functions
    scriptInterface.RegisterFunction<void, float, &SetSimRate>("SetSimRate");
    scriptInterface.RegisterFunction<void, int, &SetTurnLength>("SetTurnLength");
    scriptInterface.RegisterFunction<void, float, float, float, &SetCameraTarget>("SetCameraTarget");
    scriptInterface.RegisterFunction<int, &Crash>("Crash");
    scriptInterface.RegisterFunction<void, &DebugWarn>("DebugWarn");
    scriptInterface.RegisterFunction<void, &ForceGC>("ForceGC");
    scriptInterface.RegisterFunction<void, &DumpSimState>("DumpSimState");
    scriptInterface.RegisterFunction<void, unsigned int, &EnableTimeWarpRecording>("EnableTimeWarpRecording");
    scriptInterface.RegisterFunction<void, &RewindTimeWarp>("RewindTimeWarp");

  8. I really like 0AD so far. I wanted to try messing around with some of the options in game with the console but must be doing something wrong since I only get syntax errors. I followed the instructions found at http://trac.wildfire...wiki/Playing0AD on how to use the console. I even tried writing some of those commands verbatim only to get a syntax error message in the console.

    For example I tried

    :players[1].resources.food += 1000

    and got

    ERROR: JavaScript error: Console line 1

    SyntaxError: syntax error

    I would appreciate it if someone lets me know what I am doing wrong or point me to the right place to look.

    What I really wanted to do was something like this

    :getEntityTemplate("template_structure_civic_civil_centre", -1).TerritoryInfluence.Radius = 400

    but since the simpler thing didn't work I am figuring I am just doing something wrong. Do I perhaps need to build the game in debug mode?

    Currently I am compiling from svn source with the release option. Thanks for your help.

×
×
  • Create New...