Topic: What is better

Ron_of_Nord
Avatar
Topic Opener
Joined: 2024-04-20, 23:43
Posts: 108
OS: Windows
Version: 1.3
Ranking
Likes to be here
Location: Land_down_under
Posted at: 2025-02-28, 00:00

Just a quick question, but what is the better version to develop add-ons, a release version or a debug version of widelands ? I ask because I have been thinking seriously of doing a full fantasy add-on wiith elves,dwarves,orcs etc though no flying creatures and while I work on this I will probably need to debug numerous lua scripts. As far as I know the widelands engine doesn't support projectile weapons ( arrows, spears, balls of flaming rock etc) , is that correct ? I have planned to have various races to use melee weapons ( swords , hammers etc) even if widelands does support ranged weapons. I have no plans at this point of adding magic, the amount of code to drive that wpould be far too slow in Lua scripting, I've already played with that idea.


The aussies are coming, ya ho! ya ho!

Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 20:48
Posts: 2627
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2025-02-28, 08:55

AFAIK debugging lua scripts is best done with print statements, especially when debugging the state of variables. print statements work with both, release and debug versions.


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 2099
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2025-02-28, 10:17

When developing a bigger project such as a new tribe I strongly recommend using a Release or RelWithDebInfo version, because it is much faster during startup and gameloading, which you will be doing a lot as any errors will surface one at a time. Also, long test games can be pretty slow in Debug builds.

In Release builds, you can use the command line flag --enable_development_testing_tools to enable the in-game Lua console for more debugging (it's enabled by default in Debug builds).

There is no built-in support for ranged weapons, nor is this planned as a possible addition, because it would emphasise military aspects too much (ISTR this came up a couple of times in past discussions).


Top Quote
Ron_of_Nord
Avatar
Topic Opener
Joined: 2024-04-20, 23:43
Posts: 108
OS: Windows
Version: 1.3
Ranking
Likes to be here
Location: Land_down_under
Posted at: Yesterday 07:36

Thanks for the info, I am new to creating add-ons,though I have been playing widelands since build 18 ( way back when). I actually had no plans for ranged weapons for the same reason, it would change the flavour of widelands too much from its current way of playing. Now I know the commandline switch needed, I'll stick to my current 1.3 release version and stay playing with scripts. Probably something simple first to get the hang of the scripting and debug mode. Thanks guys !


The aussies are coming, ya ho! ya ho!

Top Quote