A Scenario with robots
Moderator: Forum Moderators
Re: A Scenario with robots
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.
Re: A Scenario with robots
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.
- Atreides
- Posts: 1090
- 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
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.
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>
Re: A Scenario with robots
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.
- Atreides
- Posts: 1090
- 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
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.
Building these robots reminds me of Plastikant. Maybe you have heard of that. : )
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>
Re: A Scenario with robots
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.
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.
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.
- Pentarctagon
- Project Manager
- Posts: 5597
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: A Scenario with robots
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
take one down, patch it around
-2,147,483,648 little bugs in the code
Re: A Scenario with robots
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.
- Atreides
- Posts: 1090
- 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
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.
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.
Re: A Scenario with robots
I can add that, shouldn't be too hard.
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.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.
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.
- Atreides
- Posts: 1090
- 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
I tried it out with a edited era file. I put ingfgtdf wrote: ↑December 21st, 2023, 12:38 amRobots 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.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.
Code: Select all
{ERA_DEFAULT}
{multiplayer/factions/dunefolk-default.cfg}
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]
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? : )
Re: A Scenario with robots
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
https://github.com/wesnoth/wesnoth/issues/3177
https://github.com/wesnoth/wesnoth/issues/7753
Re: A Scenario with robots
Sure, i can do that.Atreides wrote: ↑December 21st, 2023, 4:53 am I tried it out with a edited era file. I put inin 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...Code: Select all
{ERA_DEFAULT} {multiplayer/factions/dunefolk-default.cfg}
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]
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.
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.
Re: A Scenario with robots
thx , that's also what i ended up doing.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
(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.