A Scenario with robots

Discussion and development of scenarios and campaigns for the game.

Moderator: Forum Moderators

gfgtdf
Developer
Posts: 1432
Joined: February 10th, 2013, 2:25 pm

Re: A Scenario with robots

Post by gfgtdf »

hmm is this wesnoth 1.16 or 1.17 ?
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
User avatar
Atreides
Posts: 1075
Joined: March 30th, 2019, 10:38 pm
Location: On the 2nd story of the centre village of Merwuerdigliebe turning the lights on and off

Re: A Scenario with robots

Post by Atreides »

gfgtdf wrote: December 18th, 2023, 2:48 am hmm is this wesnoth 1.16 or 1.17 ?
16
gfgtdf
Developer
Posts: 1432
Joined: February 10th, 2013, 2:25 pm

Re: A Scenario with robots

Post by gfgtdf »

thx for the report, i uploaded a fixed version to the addon server.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
User avatar
Atreides
Posts: 1075
Joined: March 30th, 2019, 10:38 pm
Location: On the 2nd story of the centre village of Merwuerdigliebe turning the lights on and off

Re: A Scenario with robots

Post by Atreides »

Nice, that works now. Alas... I ran into another. This one doesn't stop the game but it might mean something is broken. Has to do with the poison attachment.

I attach 2 pics. One of the lua error and the other of what I was building. The error popped up again after I closed the edit box. Ooops, first pic didn't have error on it, didn't realize built in screen cap didn't see those, here found them in stderr anyways.

Code: Select all

20231218 14:45:09 error scripting/lua: ~add-ons/Scenario_with_robots/lua/component_list.lua:486: attempt to index a nil value (field 'trapper_modifier')
stack traceback:
	~add-ons/Scenario_with_robots/lua/component_list.lua:486: in field 'apply_function'
	~add-ons/Scenario_with_robots/lua/robot_mechanics.lua:278: in field 'calcualte_bonuses'
	~add-ons/Scenario_with_robots/lua/robot_mechanics.lua:322: in field 'apply_bonuses'
	~add-ons/Scenario_with_robots/lua/robot_mechanics.lua:39: in field 'edit_robot'
	~add-ons/Scenario_with_robots/lua/robot_mechanics.lua:9: in field 'edit_robot_at_xy'
	~add-ons/Scenario_with_robots/lua/robot_event_handlers.lua:4: in field 'h'
	lua/on_event.lua:19: in function <lua/on_event.lua:12>

Code: Select all

20231218 14:47:06 error scripting/lua: ~add-ons/Scenario_with_robots/lua/component_list.lua:486: attempt to index a nil value (field 'trapper_modifier')
stack traceback:
	~add-ons/Scenario_with_robots/lua/component_list.lua:486: in field 'apply_function'
	~add-ons/Scenario_with_robots/lua/robot_mechanics.lua:278: in field 'calcualte_bonuses'
	~add-ons/Scenario_with_robots/lua/robot_mechanics.lua:322: in field 'apply_bonuses'
	~add-ons/Scenario_with_robots/lua/robot_mechanics.lua:39: in field 'edit_robot'
	~add-ons/Scenario_with_robots/lua/robot_mechanics.lua:9: in field 'edit_robot_at_xy'
	~add-ons/Scenario_with_robots/lua/robot_event_handlers.lua:4: in field 'h'
	lua/on_event.lua:19: in function <lua/on_event.lua:12>
Attachments
Screenshot_20231218_144651.png
gfgtdf
Developer
Posts: 1432
Joined: February 10th, 2013, 2:25 pm

Re: A Scenario with robots

Post by gfgtdf »

Okay thx for the report, fixed and pushed a new version 1.3.3 to the addon server
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
User avatar
Atreides
Posts: 1075
Joined: March 30th, 2019, 10:38 pm
Location: On the 2nd story of the centre village of Merwuerdigliebe turning the lights on and off

Re: A Scenario with robots

Post by Atreides »

Sorry, found more problems. Can play on it seems but the errors popping up everytime the trapper unit moves are annoying. Also seems some portraits are missing.

Code: Select all

20231220 13:40:57 error display: could not open image 'portraits/robots/transparent/robot_small.png'
20231220 13:42:41 error scripting/lua: ~add-ons/Scenario_with_robots/lua/dropping.lua:20: attempt to call a nil value (field 'fire')
stack traceback:
	~add-ons/Scenario_with_robots/lua/dropping.lua:20: in field 'h'
	lua/on_event.lua:19: in function <lua/on_event.lua:12>
20231220 13:44:53 error scripting/lua: ~add-ons/Scenario_with_robots/lua/dropping.lua:20: attempt to call a nil value (field 'fire')
stack traceback:
	~add-ons/Scenario_with_robots/lua/dropping.lua:20: in field 'h'
	lua/on_event.lua:19: in function <lua/on_event.lua:12>
20231220 13:46:25 error scripting/lua: ~add-ons/Scenario_with_robots/lua/dropping.lua:20: attempt to call a nil value (field 'fire')
stack traceback:
	~add-ons/Scenario_with_robots/lua/dropping.lua:20: in field 'h'
	lua/on_event.lua:19: in function <lua/on_event.lua:12>
20231220 13:49:42 error scripting/lua: ~add-ons/Scenario_with_robots/lua/dropping.lua:20: attempt to call a nil value (field 'fire')
stack traceback:
	~add-ons/Scenario_with_robots/lua/dropping.lua:20: in field 'h'
	lua/on_event.lua:19: in function <lua/on_event.lua:12>
20231220 13:53:48 error display: could not open image 'portraits/robots/robot_small.png'
20231220 13:53:48 error gui/draw: Image: 'portraits/robots/robot_small.png' not found and won't be drawn.
20231220 13:54:59 error scripting/lua: ~add-ons/Scenario_with_robots/lua/dropping.lua:20: attempt to call a nil value (field 'fire')
stack traceback:
	~add-ons/Scenario_with_robots/lua/dropping.lua:20: in field 'h'
	lua/on_event.lua:19: in function <lua/on_event.lua:12>
20231220 13:57:26 error scripting/lua: ~add-ons/Scenario_with_robots/lua/dropping.lua:20: attempt to call a nil value (field 'fire')
stack traceback:
	~add-ons/Scenario_with_robots/lua/dropping.lua:20: in field 'h'
	lua/on_event.lua:19: in function <lua/on_event.lua:12>
Building these robots reminds me of Plastikant. Maybe you have heard of that. : )
gfgtdf
Developer
Posts: 1432
Joined: February 10th, 2013, 2:25 pm

Re: A Scenario with robots

Post by gfgtdf »

Atreides wrote: December 20th, 2023, 7:07 pm Sorry, found more problems. Can play on it seems but the errors popping up everytime the trapper unit moves are annoying.
No need to be sorry, it's me who made these bugs not you. Its seems like the wesnoth api changed between 1.16 and 1.17, i probably should have tested more on 1.16 ...

Anyways, uploaded a fixed version to the addon server.
Atreides wrote: December 20th, 2023, 7:07 pm Also seems some portraits are missing.
Hmm i think all the units in this addons have no portraits. I have no experience with making them so it'll probably stay like that for quite a while.
Atreides wrote: December 20th, 2023, 7:07 pm
Building these robots reminds me of Plastikant. Maybe you have heard of that. : )

Hmm no i wasn't aware of its existance until now, but nice to know.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
User avatar
Pentarctagon
Project Manager
Posts: 5566
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: A Scenario with robots

Post by Pentarctagon »

gfgtdf wrote: December 20th, 2023, 8:47 pm
Atreides wrote: December 20th, 2023, 7:07 pm Sorry, found more problems. Can play on it seems but the errors popping up everytime the trapper unit moves are annoying.
No need to be sorry, it's me who made these bugs not you. Its seems like the wesnoth api changed between 1.16 and 1.17, i probably should have tested more on 1.16 ...
If the change isn't listed in viewtopic.php?t=57288, can you add the change there?
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
gfgtdf
Developer
Posts: 1432
Joined: February 10th, 2013, 2:25 pm

Re: A Scenario with robots

Post by gfgtdf »

It is listed already, for some reason i assumes that the api was already in 1.16.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
User avatar
Atreides
Posts: 1075
Joined: March 30th, 2019, 10:38 pm
Location: On the 2nd story of the centre village of Merwuerdigliebe turning the lights on and off

Re: A Scenario with robots

Post by Atreides »

Also some ideas for improvements.
1) Would be nice to be able to check the config of a robot when not in a castle so you know whether its suitable for sending back for an upgrade.
2) The era in multiplayer could be improved by using the default_era macro plus including the dunefolk. Currently the latter is missing and also you have to manually pick for each ai faction because it defaults to drakes if you don't since the random faction is included with the macro.
gfgtdf
Developer
Posts: 1432
Joined: February 10th, 2013, 2:25 pm

Re: A Scenario with robots

Post by gfgtdf »

Atreides wrote: December 20th, 2023, 11:35 pm Also some ideas for improvements.
1) Would be nice to be able to check the config of a robot when not in a castle so you know whether its suitable for sending back for an upgrade.
I can add that, shouldn't be too hard.
Atreides wrote: December 20th, 2023, 11:35 pm 2) The era in multiplayer could be improved by using the default_era macro plus including the dunefolk. Currently the latter is missing and also you have to manually pick for each ai faction because it defaults to drakes if you don't since the random faction is included with the macro.
Robots used to be on top (and the default selection), but in 1.16 my workaround to for that stopped working so the game sorts it alphabetically, the other factions are basically only in that era for ai sides since ai cannot play with the robots faction. Will think about what i can do here.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
User avatar
Atreides
Posts: 1075
Joined: March 30th, 2019, 10:38 pm
Location: On the 2nd story of the centre village of Merwuerdigliebe turning the lights on and off

Re: A Scenario with robots

Post by Atreides »

gfgtdf wrote: December 21st, 2023, 12:38 am
Atreides wrote: December 20th, 2023, 11:35 pm 2) The era in multiplayer could be improved by using the default_era macro plus including the dunefolk. Currently the latter is missing and also you have to manually pick for each ai faction because it defaults to drakes if you don't since the random faction is included with the macro.
Robots used to be on top (and the default selection), but in 1.16 my workaround to for that stopped working so the game sorts it alphabetically, the other factions are basically only in that era for ai sides since ai cannot play with the robots faction. Will think about what i can do here.
I tried it out with a edited era file. I put in

Code: Select all

    {ERA_DEFAULT}
    {multiplayer/factions/dunefolk-default.cfg}
in place of the list and with no mirror turned on it worked out great. I picked the robots and the ai got the other 7 (on 8p map). On a 9p or more map it might randomly give the ai the robots though...

The standard sol'n is this I believe:

Code: Select all

[multiplayer_side]
    id=Random_No_Robots
    name=_ "Non-Robot"
    random_faction=yes
    except=Robot_Faction
[/multiplayer_side]
Can't use the macro then, must list them after all, uh which is how they are currently, heh.

Oh and some thoughts on MP costs. I think the small robo should cost 8 not 10 gp and the laser part 3 not 4 gp. The rest unsure.

By the way how many props needed to fly? 4? 3 didn't seem enough or does it weigh the robot? : )
User avatar
Ravana
Forum Moderator
Posts: 3011
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: A Scenario with robots

Post by Ravana »

I had to adjust faction names, adding number of dots to specify sorting order.
https://github.com/wesnoth/wesnoth/issues/3177
https://github.com/wesnoth/wesnoth/issues/7753
gfgtdf
Developer
Posts: 1432
Joined: February 10th, 2013, 2:25 pm

Re: A Scenario with robots

Post by gfgtdf »

Atreides wrote: December 21st, 2023, 4:53 am I tried it out with a edited era file. I put in

Code: Select all

    {ERA_DEFAULT}
    {multiplayer/factions/dunefolk-default.cfg}
in place of the list and with no mirror turned on it worked out great. I picked the robots and the ai got the other 7 (on 8p map). On a 9p or more map it might randomly give the ai the robots though...

The standard sol'n is this I believe:

Code: Select all

[multiplayer_side]
    id=Random_No_Robots
    name=_ "Non-Robot"
    random_faction=yes
    except=Robot_Faction
[/multiplayer_side]
Sure, i can do that.
Atreides wrote: December 21st, 2023, 4:53 am
Oh and some thoughts on MP costs. I think the small robo should cost 8 not 10 gp and the laser part 3 not 4 gp. The rest unsure.
Hmm i can do that i don't have a strong opinion on that personally, since i didn't invest that much into balaing it yet.
Atreides wrote: December 21st, 2023, 4:53 am By the way how many props needed to fly? 4? 3 didn't seem enough or does it weigh the robot? : )
Iirc fly just means that the movecost get a little better, currently they get better at 3 propellors and then everythign costs 1 at 6 properllors. At 5 propellors you get a propellorstorm cold type attack tho.


I think logicially it would make more sense if as soon as the robot completely "flies" the number of wheels becomes irrelevant, but that's not programmed yet.

Also im unsure how to balance it, since i like both the flying idea and the propellorstorm idea.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
gfgtdf
Developer
Posts: 1432
Joined: February 10th, 2013, 2:25 pm

Re: A Scenario with robots

Post by gfgtdf »

Ravana wrote: December 21st, 2023, 10:25 am I had to adjust faction names, adding number of dots to specify sorting order.
https://github.com/wesnoth/wesnoth/issues/3177
https://github.com/wesnoth/wesnoth/issues/7753
thx :) , that's also what i ended up doing.
(actual i think it woudl be better if the robot faction was the default and the random faction the second, but i don't think there is a way to do it )
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
Post Reply