Skip navigation

Few Questions about the Sandbox

Forum NavigationHome > Forum Index > Hegemony > Few Questions about the Sandbox
Level 5 Human gamer
Alignment: True neutral
Posted on March 21, 2014 at 3:01 pm

Well, I managed to get the Belgica sandbox to work (it's not exactly difficult to rename one file),
and I was looking through all of the files, and I basically have three questions (and by questions I really mean topics):

1. What is in the .fi file, its compiled so I cant really see much other than a list of factions (and to look at reminds me of a LUAC file)
2. What is the .map file? Is it just a 3d model, or is it an archive that includes the 3d map and all the info that needs for the placement of resources, camps, bridges, etc.
3. How versatile is your LUA api, would it be possible to create community-made campaigns? Oh and that makes me wonder, does the game have a lua debugger built into the console? I found the Warscape engine's lack of any debug tools incredibly frustrating (tho writing ur own log isnt exactly difficult, it's just when you're fighting against the engine to get error reports it really slows things down)

Basically, what I'm getting at is, with a little ingenuity, would it be possible to mod the game to the extent of adding a new map, or would we be limited to making variations set on the same map? Personally i like the idea of moving the map south and making a Second Punic War sandbox

Level 7 Extraplanar programmer
Alignment: Good
Posted on March 21, 2014 at 10:26 pm

Modding support is not in place at the moment, and as the game is still in development any mods (especially mods dealing with currently-unreleased portions like the sandbox) made will probably have to cope with changes that may substantially overhaul the base game. That said, it is technically possible to create custom scenarios and/or sandboxes on the map of Gaul.

What is in the .fi file, its compiled so I cant really see much other than a list of factions (and to look at reminds me of a LUAC file)
The .fi file is a compressed XML file (like our saved games). It basically controls who has what at the start; it defines all the factions, their starting gold, which cities are active and who they're native to, and any objects the factions might start with.
If you wanted to make your own scenario, there are two ways you could do this; create the factions you want and make sure they control the right items ("newfaction()" to add a new faction you know the name for, and use "setfaction()" to switch a city's native factions), have good gold etc, and use the "savescenario()" function in the console to save a saved game without units or trade routes or anything (or you could just save the game if you want all those extra items - renaming the file extension to '.fi' will making typing it later easier, but is not necessary).
Alternatively, you could just use a blank .fi ("caesar default" in the Campaigns folder has all the cities built and part of "Independent", the only defined faction in it) and assign all those things via script at campaign start-up. Looking in our campaign's scripts may give some good examples of how to initialize a faction via script.

What is the .map file? Is it just a 3d model, or is it an archive that includes the 3d map and all the info that needs for the placement of resources, camps, bridges, etc.
The latter; in it you'll find every tree, prop, farm, city, pathfinding region, AI raid node... it's been created via an in-house editor, so you can't really make your own at the moment, unfortunately.

How versatile is your LUA api, would it be possible to create community-made campaigns? Oh and that makes me wonder, does the game have a lua debugger built into the console? I found the Warscape engine's lack of any debug tools incredibly frustrating (tho writing ur own log isnt exactly difficult, it's just when you're fighting against the engine to get error reports it really slows things down)
It's possible to create community-made campaigns. We've made some effort to make sure the console throws useful error messages when something goes wrong (though you'll still get some "accessing invalid memory" and the like), you'll always have a call-stack of what file and line the crash occurred and which file called where the crash was, and what called that, etc.

Basically, what I'm getting at is, with a little ingenuity, would it be possible to mod the game to the extent of adding a new map, or would we be limited to making variations set on the same map? Personally i like the idea of moving the map south and making a Second Punic War sandbox
You are, for the time being, stuck with using the same map, and we don't yet have support for adding new units (Carthage may have used Gallic mercenaries, but I'm pretty sure there were others too) or factions. It is not currently possible to create a Second Punic War sandbox, I'm afraid.

We currently don't have much mod support in the game; at the moment, adding custom scenarios into the new game box requires additions to the language.str file (Specifically, you'll need Mods::FOLDERNAME::NAME and Mods::FOLDERNAME::DESC), which changes every time we update. We hope to add support for custom string files and make the new game box easier to add to in the future, but for now, it's probably better to start any custom scenarios through console commands. Use 'loadgame("FI-FILE", false)' and 'dofile("STARTUP-LUA")' to run any custom campaigns.

Hope this helps.

Level 5 Human gamer
Alignment: True neutral
Posted on April 23, 2014 at 3:53 pm

After fooling around for quite some time attempting to alter Belgica and create a "Sandbox" that encompasses all the available cities and regions, I'd like to take this moment and emphasize from a consumer-and-programmer angle that your sandbox has some truly spectacular potential.

I bought Hegemony: Gold to play the sandbox specifically as the Rome: Caesar one is currently incomplete. My desire for this type of game has not been itched since 2003 in Warcraft 3. The sandbox offers a wonderful opportunity for you to give your game a "Sandbox Campaign" in addition to the finely crafted missions and objectives in Mission Mode. In essence, this "Sandbox Campaign" could win over many, many people (and reviews!) if you allow us to conquer Gaul as Zolfresh would, or as Christopher would, or as Aodh Mor would.

Certainly people will question "Why would I want to be a tribal?" when Legions are obviously superior qualitatively; barbarian "Federations" that a tribal player assembles dissuade this. I don't mind a tribal confederation I have to assemble!

I'd like to thank Christopher for his candid replies and I am curious if you could expand upon "Technically possible to create custom scenarios and/or sandboxes on the map of Gaul." If anything, I'd like to spend some time creating such a thing and share my work with the devs/community, to provide a somewhat more visceral interpretation of what I mean. I'm certain (or at least, hope) that you folks at Longbow already have my idea, I'd simply like to provide a "mod" interpretation.

A little documentation on the precedence of xyz borders for example would assist greatly. I understand mods for the incomplete features would have to deal with rapidly changing variables and dependencies,