Latest Posts

Topic: scenario AI

Tibor

Joined: 2009-03-23, 22:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2017-02-05, 17:50

Behavior is to be:

  • if invalid ware - it should complains "Unrecognized ware/worker blabla"
  • if valid ware - it returns 0 in case nothing was produced yet

I checked this behaviour right now, I think it works as expected. But if you post your LUA code here I can look at it. Maybe the nil error is related to something else (player f.e.)?


Top Quote
Ex-Member
Avatar
Joined: 2014-09-12, 09:53
Posts: 184
Ranking
Widelands-Forum-Junkie
Posted at: 2017-02-06, 13:39

The error was due to something else - my stupidity. I was editing a copy of the scripy not the one I was running.


Top Quote
Tibor

Joined: 2009-03-23, 22:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2017-02-06, 17:50

I am glad that the code is not broken, and hope it will be useful for you.


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 14:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2017-02-07, 10:24

Documentation:

https://wl.widelands.org/docs/wl/autogen_wl_game/

produced_wares_count(what)

    Returns count of wares produced byt the player up to now. ‘what’ can be either an “all” or single ware name or an array of names. If single ware name is given, integer is returned, otherwise the table is returned.

Busy indexing nil values

Top Quote
hessenfarmer
Avatar
Topic Opener
Joined: 2014-12-11, 22:16
Posts: 2648
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2017-02-12, 22:03

Hi everybody, Tinker has done ssome work to bring the scenario to fit with newer builds. as well as he invented a chain of activating the buildings in line with the story. Only thing is sending scripts to each other in PM is not very config controlled. So is there a way to get this scenario to a more controlled space to collaborate on it. This would help with the translation work as well. As Nasenbaer was the originator of the Roman campaign I'd like to have his feedback on this scenario as well. Furthermore I have an idea in my mind for the follow on scenario. Short storyline is Lucius gets home and finds his country in a complete mess (economy not working at all due to multiple reasons) What do you think about this one? regards hessenfarmer


Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 19:48
Posts: 2439
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2017-02-13, 07:04

I think the best for collaborative work is to use Bazaar in this case. See Bazaar Primer for an introduction.

If you have set up a 'Branch' you could submit it to Launchpad and everyone could download it. If someone makes changes to the scripts, he updates the branch and the other one could update his own copy of the branch.

If you have any questions, feel free to ask face-smile.png


Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote
hessenfarmer
Avatar
Topic Opener
Joined: 2014-12-11, 22:16
Posts: 2648
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2017-03-16, 22:01

Hello again,

I tried to follow the instructions given in kaputtniks link to get my scenario to launchpad. But I#m not sure if I had done this correctly. Bazaar told me that I had committed revision 8325 which included the mission and the necessary changes to the mission tree. Needs testing now and some help from an experienced lua scripter. Of course I have tested the scenario intensivly before committing I found out, that although the scenario works and all objectives were correctly monitored the message box diary_page_6 within function "artifacts" is not triggered anyhow. If I have done something wrong please advice how to improve in working with bazaar and launchpad.

best regards hessenfarmer


Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 19:48
Posts: 2439
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2017-03-17, 16:59

Thanks face-smile.png

I got it. But launchpad has some problems it seems. Two branches are shown as "This branch is empty" in the overview...


Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote
hessenfarmer
Avatar
Topic Opener
Joined: 2014-12-11, 22:16
Posts: 2648
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2017-03-17, 20:00

I'm not quite sure whether it si launchpad or it was a fault on my side using bazaar. Anyhow if you got it it should be available. So everybody please feel free to test it and provide feedback. As I told in my last post there is one message in function which doesn't get triggered although the function works regarding the accounting of the artifacts. One other question. As I am now pleased with the map and the story I will have time to translate the scenario to the german language, but I don't know exactly how to do this. In particular where are the language text files? How can I work on them? Do I need transifex? Does transifex need the branch being merged? I really would appreciate if someone could get me to be able to work on the translation as I really would love to get this scenario into an release. (already spent a nice bunch of hours on it)

best regards hessenfarmer (stephan-lutz)


Top Quote
Ex-Member
Avatar
Joined: 2014-09-12, 09:53
Posts: 184
Ranking
Widelands-Forum-Junkie
Posted at: 2017-03-18, 08:50

I have no idea how to test it or even find it.

Translation is through tranifex, but no idea how you get it to show up. Following an 'improvment' in transifex do not edit files offline as changes are discarded on upload.


Top Quote