Latest Posts

Topic: Creating a new tribe: Crash upon starting the game

UberWaffe
Avatar
Topic Opener
Joined: 2014-02-01, 21:02
Posts: 4
Ranking
Just found this site
Location: Orbiting reality
Posted at: 2014-02-02, 09:41

Hi, all.

I recently discovered widelands and have been playing around with it for the past few days.

As with most new games I get, I took a look to see what I can mess around with. Soon enough I was busy making a new tribe. (Don't hold your breath, I'm terrible at art, and the tribe is more for the fun of making something than for actual meaningful gameplay.)

I got as far as creating a basic tribe that gets through most of the loading process but crashes at the very end without any apparent error message. (Apologies if this is covered somewhere in the WIKI, but I saw nothing relevant though had not read all of it. :\ )

Stdout.txt ends with the lines:

[sync] Reset load_animations took 3,173000 seconds Forcing flag at (43, 59) Message: adding (wh) (warehouse) 1

And Stderr.txt is entirely blank, as in 0KB in size.

Running the game with one of the default tribes indicates that stdout.txt should be doing something like:

Autosave: initialized Sound_Handler: loaded song "music\ingame_20.ogg"

as the next step. This leads me to believe that I made some mistake in the scripting lua file, but for the life of me I do not see anything. The lua script is pinched from the atlanteans and is modified as follows:

use("aux", "infrastructure")

set_textdomain("tribe_empire")

init = { name = _ "Headquarters medium", func = function(plr, shared_in_start)

local sf = wl.Game().map.player_slots[plr.number].starting_field if shared_in_start then sf = shared_in_start else plr:allow_workers("all") end

prefilled_buildings(plr, { "headquarters", sf.x, sf.y, wares = { stone = 50, trunk = 20, plank = 10, beemoththread = 4, textile = 5, manaspark = 1, portalframe = 1, corn = 5, cornflour = 12, fruit = 3, beemothhoney = 1, fish = 3, meat = 3, meal = 3, water = 12, shickaxe = 16, farmtools = 4, net = 6, toolbelt = 6, wood_club = 10, }, workers = { builder = 10, carrier = 40, geologist = 4, forester = 2, labourer = 2, farmer = 2, miner = 1, miner_master = 1, temple_priest = 1, beast_kanga = 1, beast_kitsune = 2, beast_garou = 1, }, soldiers = { [{0,0,0,0}] = 35, } }) end }

return init

I've attempted to play around with the set_textdomain, (currently empire) but it seems to make no difference.

Any help or pointing in a general direction would be greatly appreciated.


People just cannot stay away from me...

But that is because I'm so fat I have my own gravitational field.

It is the flying cutlery that freaks me out.

Top Quote
Nasenbaer
Avatar
Joined: 2009-02-21, 17:17
Posts: 828
Ranking
One Elder of Players
Location: Germany
Posted at: 2014-02-02, 13:46

Hi UberWaffe,

it's hard to say what exactly went wrong, however I hope you can answer some of the following questions, which hopefully brings us closer to the real problem.

  • Did the game crash completely (like the window is gone and that's it)?
  • If yes, this should not happen at all. Even with inconsistent game data, Widelands should show an error message and return to the main menu. If you've got the possibility to run Widelands in a debugger (e.g. gdb) to catch the reason for the crash and a backtrace if possible, this would bring us much closer to the bug
  • If no, what is the error message shown by Widelands?

  • Did you try to minimize the startup script? So basically to change the script that it just places an empty building at the starting location, to check if at least the real basics are working?

Cheers,

Nasenbaer

Edited: 2014-02-02, 13:47

Top Quote
UberWaffe
Avatar
Topic Opener
Joined: 2014-02-01, 21:02
Posts: 4
Ranking
Just found this site
Location: Orbiting reality
Posted at: 2014-02-02, 21:50

Nasenbaer wrote: Did the game crash completely (like the window is gone and that's it)?

Yes, window had simply closed without any error message.

Nasenbaer wrote: Did you try to minimize the startup script? So basically to change the script that it just places an empty building at the starting location, to check if at least the real basics are working?

This turned out to be it. I had "plank" instead of "planks" in the lua. Also, the current developement build 18 points out errors in lua, where 17 had not. Really very helpful.

Got it loading now without issues. Thanks for the help!

Time to see if those fruit trees work! The plan is to make them take much longer to mature than corn, but if harvested revert to mature (1 step back) as opposed to entirely back. I.e. longer setup time, higher yield once they get going.

Edited: 2014-02-03, 03:18

People just cannot stay away from me...

But that is because I'm so fat I have my own gravitational field.

It is the flying cutlery that freaks me out.

Top Quote
Nasenbaer
Avatar
Joined: 2009-02-21, 17:17
Posts: 828
Ranking
One Elder of Players
Location: Germany
Posted at: 2014-02-03, 16:07

UberWaffe wrote: Time to see if those fruit trees work! The plan is to make them take much longer to mature than corn, but if harvested revert to mature (1 step back) as opposed to entirely back. I.e. longer setup time, higher yield once they get going.

Sounds like a very interesting idea. Please keep us up to date. There will be a time, where new tribes are added to Widelands, so...


Top Quote
UberWaffe
Avatar
Topic Opener
Joined: 2014-02-01, 21:02
Posts: 4
Ranking
Just found this site
Location: Orbiting reality
Posted at: 2014-02-04, 01:54

Nasenbaer wrote: Sounds like a very interesting idea. Please keep us up to date. There will be a time, where new tribes are added to Widelands, so...

Well, thanks. I'm not sure how well it will all work out. Already hit a snag with not being able to use "worker=" to order workers other than the primary worker around. (I.e. a farm with multiple farmers). But I'm sure I can shuffle some numbers to compensate.

The concept I am playing around with currently:

-> An economy focussed around recruiting workers.

-> A 2 stage economy, with a near full economy in stage 1, but upgraded/improved in stage 2.

-> More multi-tasking buildings, making basic economy easier, but efficient economy harder.

-> Fully sustainable economy only in stage 2.

The biggest experiment is that carriers are no longer free, but instead you need to provide food to a house to recruit a carrier (similar to how horses/donkeys/etc. are done). So with that being your food sink, mines instead require candles (one of the products of bee-moth keeper) and trunks in order to mine. And soldiers require only weapons/armour to level, though take longer.

The second 'experiment' is a 2 stage economy, where your basic carriers/citizens cannot perform all the jobs, not even if you have the tools needed. Instead a 2nd tier recruitment building (which eats copious amounts of food at the moment) recruits different types of workers. (Currently this is flavoured as a temple summoning beasts through a portal). The products that can only be produced by these stage 2 workers are typically used in upgrading the economy buildings, as well the highest 2 tiers of weapons/armor for your soldiers.

Edited: 2014-02-04, 01:57

People just cannot stay away from me...

But that is because I'm so fat I have my own gravitational field.

It is the flying cutlery that freaks me out.

Top Quote
staustelladam

Joined: 2011-11-24, 21:33
Posts: 70
Ranking
Likes to be here
Posted at: 2014-02-05, 17:05

"The biggest experiment is that carriers are no longer free, but instead you need to provide food to a house to recruit a carrier (similar to how horses/donkeys/etc. are done). So with that being your food sink, mines instead require candles (one of the products of bee-moth keeper) and trunks in order to mine. And soldiers require only weapons/armour to level, though take longer.

The second 'experiment' is a 2 stage economy, where your basic carriers/citizens cannot perform all the jobs, not even if you have the tools needed. Instead a 2nd tier recruitment building (which eats copious amounts of food at the moment) recruits different types of workers. (Currently this is flavoured as a temple summoning beasts through a portal). The products that can only be produced by these stage 2 workers are typically used in upgrading the economy buildings, as well the highest 2 tiers of weapons/armor for your soldiers."

Sounds not unlike my addiction to build 16 - Settlers III allowed for s/m/l houses to recruit more workers. I seem to remember asking if there was any way to edit the number of workers produced in a new warehouse, and was told that the figure of 100 was embedded in the code rather than the tribe/building data.

I created all sorts of new workers, wares and buildings to "spread" the potential and make the game so much more enjoyable and challenging. As I am not a coder I did this purely by editing the worker/building/ware/terrain folders and mined things like gold and copper (to "buy" things at a "market") clay (for pots and tankards - beer needs to be drunk from something) made all sorts of wonderful items (such as beer barrels) farmed sheep (for wool) cows (produced leather) and bees (for honey to make cakes and mead) ... I like the idea of wax candles and fruit trees.

... when you get right down to it there is very little you can't create from your imagination. Sadly when build 17 came out all the config files were different, and I didn't have anywhere near as much time to devote to building my perfect world. Now just waiting on build 18 to start all over again:)


Top Quote
UberWaffe
Avatar
Topic Opener
Joined: 2014-02-01, 21:02
Posts: 4
Ranking
Just found this site
Location: Orbiting reality
Posted at: 2014-02-05, 23:49

staustelladam wrote: Sounds not unlike my addiction to build 16 - Settlers III allowed for s/m/l houses to recruit more workers. I seem to remember asking if there was any way to edit the number of workers produced in a new warehouse, and was told that the figure of 100 was embedded in the code rather than the tribe/building data.

I created all sorts of new workers, wares and buildings to "spread" the potential and make the game so much more enjoyable and challenging. As I am not a coder I did this purely by editing the worker/building/ware/terrain folders and mined things like gold and copper (to "buy" things at a "market") clay (for pots and tankards - beer needs to be drunk from something) made all sorts of wonderful items (such as beer barrels) farmed sheep (for wool) cows (produced leather) and bees (for honey to make cakes and mead) ... I like the idea of wax candles and fruit trees.

... when you get right down to it there is very little you can't create from your imagination. Sadly when build 17 came out all the config files were different, and I didn't have anywhere near as much time to devote to building my perfect world. Now just waiting on build 18 to start all over again:)

I'm currently working on build 18 (dev version) and you can specify the number of carriers a tribe starts with. As long as you then make the carriers cost something (i.e. not have a empty buildcost) it seems to work fine. (I say "seems" because I have some trouble correctly displaying the carrier count in the warehouse, still looking into why. But I've "run-out" of carriers and have had their numbers replenished from a house, so that all seems to work as intended.)


People just cannot stay away from me...

But that is because I'm so fat I have my own gravitational field.

It is the flying cutlery that freaks me out.

Top Quote