code questions #1
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
-
- Posts: 67
- Joined: November 17th, 2023, 7:33 pm
code questions #1
in random maps > wesband
what is it:
4 player coop rpg, single unit each
need to know if each of these need lua, or would lua make each of these easier, or can wml do it
assuming for now wesnoth doesnt support other code languages until i discover/learn any new info
1 in popup 'selection type' menu, font dont have colors, can font have colors?
2 can different types of fonts/typograprjry be embedded, or this game always use same font?
menu has list of options
3 - some options can be seleected but cant be picked, but you can still press ok
- clicking 'ok' does nothing
can lua or wml update/fix this menu (or any other 'menus' or ui elements)
4 menu also has a transparent background making text/font hard to read
not good color contrast or accessibility, probably breaks lots of good practices in web accessibility and related topics and stuff etc
5
when (a unit is) on a hex (like a 'shop' or dungeon')
- you have to right click > to open menu to enter w/e thing shop dungeon etc
- can you hotkey or other ways to enter X (shop, dungeon, w/e thing, etc)
trying briefly different extensions to see what can/cant be done
also trying them to find anything interesting
what is it:
4 player coop rpg, single unit each
need to know if each of these need lua, or would lua make each of these easier, or can wml do it
assuming for now wesnoth doesnt support other code languages until i discover/learn any new info
1 in popup 'selection type' menu, font dont have colors, can font have colors?
2 can different types of fonts/typograprjry be embedded, or this game always use same font?
menu has list of options
3 - some options can be seleected but cant be picked, but you can still press ok
- clicking 'ok' does nothing
can lua or wml update/fix this menu (or any other 'menus' or ui elements)
4 menu also has a transparent background making text/font hard to read
not good color contrast or accessibility, probably breaks lots of good practices in web accessibility and related topics and stuff etc
5
when (a unit is) on a hex (like a 'shop' or dungeon')
- you have to right click > to open menu to enter w/e thing shop dungeon etc
- can you hotkey or other ways to enter X (shop, dungeon, w/e thing, etc)
trying briefly different extensions to see what can/cant be done
also trying them to find anything interesting
-
- Posts: 67
- Joined: November 17th, 2023, 7:33 pm
code basic learning #2
code problem:
for single player campagin, why can players create single player campagins when creating those maps breaks the campaign and game?
when using 'create game' in wesnoth for single player campagin, it breaks single player campagins (not sure right now if it does for all of them)
is it cos wesnoth (game) code is just like that basically?
example:
single player campagin > war of jewel
when starting game using 'campaign' in wesnoth
after completing one of early objective in large castle place, nothing happened
no idea if one of the basic addon/mods broke it
what is it
no idea, very confusing campaign or w/e it is
when starting game using 'create game' in wesnoth
summary: it completely broke game basically
setting other players to either ai or players both broke campaign/game
makes campaign unplayable basically - ai units are controlled by player
one of player (3rd) has 1 unit > and you need to right click to make it a leader to buy units
when creating game
with all addons/mods off
when clicking/enabling 'unitmarker mod' >
all of
'random recruits'
additional saurian advancemtnts
faction theme flags
all turned on by itself
preferences > cache > purge all
cos who knows what in the world is wrong with addons/addon cache
retried
clicked unitmarker mod'
4 other addons turned on by itself
again
3 other addons turned on by itself (ones in 1st example)
turned on 'random recuirts'
4 other addons turned on by itself (but random rec stayed off ?? )
have no idea which addons work or dont work with this
single player campagin > war of jewel
which one of these addons/mods need to be fixed/updated?
started game with only 'unitmark' on
took forever to load again..
for single player campagin, why can players create single player campagins when creating those maps breaks the campaign and game?
when using 'create game' in wesnoth for single player campagin, it breaks single player campagins (not sure right now if it does for all of them)
is it cos wesnoth (game) code is just like that basically?
example:
single player campagin > war of jewel
when starting game using 'campaign' in wesnoth
after completing one of early objective in large castle place, nothing happened
no idea if one of the basic addon/mods broke it
what is it
no idea, very confusing campaign or w/e it is
when starting game using 'create game' in wesnoth
summary: it completely broke game basically
setting other players to either ai or players both broke campaign/game
makes campaign unplayable basically - ai units are controlled by player
one of player (3rd) has 1 unit > and you need to right click to make it a leader to buy units
when creating game
with all addons/mods off
when clicking/enabling 'unitmarker mod' >
all of
'random recruits'
additional saurian advancemtnts
faction theme flags
all turned on by itself
preferences > cache > purge all
cos who knows what in the world is wrong with addons/addon cache
retried
clicked unitmarker mod'
4 other addons turned on by itself
again
3 other addons turned on by itself (ones in 1st example)
turned on 'random recuirts'
4 other addons turned on by itself (but random rec stayed off ?? )
have no idea which addons work or dont work with this
single player campagin > war of jewel
which one of these addons/mods need to be fixed/updated?
started game with only 'unitmark' on
took forever to load again..
-
- Posts: 67
- Joined: November 17th, 2023, 7:33 pm
#3 wesnoth code learning
multiplayer campagin > greatest quest
what is it
seems like wc
3 players wc
not sure which is more newly updated
seems like need custom fractions/classes, maybe even more than 1 of them
the custom fractions/classes that are needed for this, or that are meant for this map doesnt auto-select when creating a map/game using this custom addon/map
can lua or wml update or fix that or what can, whats needed to update/fix that
when creating games, is wesnoth's ability to autoselect the correct fractions/classes that a map is meant or designed for not in the wesnoth code yet?
is that a wesnoth code problem or a addon code problem basically
what would i or anyone need to learn to fix this
what is it
seems like wc
3 players wc
not sure which is more newly updated
seems like need custom fractions/classes, maybe even more than 1 of them
the custom fractions/classes that are needed for this, or that are meant for this map doesnt auto-select when creating a map/game using this custom addon/map
can lua or wml update or fix that or what can, whats needed to update/fix that
when creating games, is wesnoth's ability to autoselect the correct fractions/classes that a map is meant or designed for not in the wesnoth code yet?
is that a wesnoth code problem or a addon code problem basically
what would i or anyone need to learn to fix this
-
- Posts: 67
- Joined: November 17th, 2023, 7:33 pm
#4 wesnoth code learning
'scenarios' > war of gods stuff
in 'create game'
all 'war of gods' maps seem like they need 'war of god era'
descritpion/info of this addons says that but do not know if thats correct/accurate or not
doesnt seem like you can choose 'war of god ear' in any of the 'war of gods' maps
none of the maps for 'war of gods' appears to work
cannot select 'war of god ear' for any 'war of gods' map
did not test with 'default' or other fractions/classes
i dun know if this is a wesnoth code problem or a addon code problem (or both)
i dun know if its either or for sure
uninstalled
dont think it should be in the addons
there should be a addon section call 'broken/bugs/very buggy' in addition to campaigns/era/etc
theres too many of those
in 'create game'
all 'war of gods' maps seem like they need 'war of god era'
descritpion/info of this addons says that but do not know if thats correct/accurate or not
doesnt seem like you can choose 'war of god ear' in any of the 'war of gods' maps
none of the maps for 'war of gods' appears to work
cannot select 'war of god ear' for any 'war of gods' map
did not test with 'default' or other fractions/classes
i dun know if this is a wesnoth code problem or a addon code problem (or both)
i dun know if its either or for sure
uninstalled
dont think it should be in the addons
there should be a addon section call 'broken/bugs/very buggy' in addition to campaigns/era/etc
theres too many of those
-
- Posts: 67
- Joined: November 17th, 2023, 7:33 pm
whole addons thing is a fuking mess
Spoiler:
all addons/mods off
started game
random recuirts popup shows in game
then
uninstalled a few addons
including random recruits
and random recruits popup didnt show up anymore
this fixed that problem
reinstalled random recruits
but not the other uninstalled addons
this problem didnt happened again
then
re-installed 'unit marker'
problem didnt happened again
then
re-installed 'corpse mod'
problem didnt happened again
dont remember which other few addons uninstalled
but all the addons need to be checked and updated
most likely this is all problems related to wesnoth addon code overall
or any of the other codes related to wesnoth addons, like 'preferences cache' or whatever else
theres something wrong with different addon in combo with other different addons, and other way around, and/or just with wesnoth addon code of however it works
or it could possibly be other parts of the code in wesnoth (like map editor where going into map editors causes addons to break) - like what happened before
how to fix various parts of wesnoth code and addon's code in combo with other addons
update: extra testing
no problems with 1st 2 seafires or however those maps are ordered
except that enabling addon 'unitmarker' did not work on these map
didnt test other addons
didnt work on any of the maps (seafires maps)
checked a default singplayer campaign via 'campagins' and addon worked
so there's specifically something wrong with 'create game' or its settings or addons
tried that same default singleplayer campaign via 'create game' and that addon didnt work also
so there's something wrong with 'create game' and/or anything else along in the process
but that sounds like wesnoth code problem for sure
conclusion so far: wesnoth code problem with addons related to 'create game' and all code closely related to all that stuff of 'create game'
Last edited by needmoreplayers on December 24th, 2023, 1:30 pm, edited 1 time in total.
Re: code questions #1
You should focus on your post structure. I do not have much interest to try understand random fragments of text without any sentence structure.
Re: code questions #1
From what I see, you mix experimental add-ons and wonder why experimental add-on author A hasn't taken in regard what experimental add-on author B had in his mind. Which is imho impossible, as some add-ons change the game in many ways, it is impossible to foresee all possible combinations.
Considering the menu points - some menu points in Wesband don't have a function, they work as kind of a "headline". It is an easy way to sort options:
For example make an option for "Swords" under which all possible swords can be equipped. But as Ravana said: we don't even know what you want. You will get no answers you want in the way you post. Also it seems you jump to conclusions and make conclusions that are not correct:
such as above: the experimental add-on designer A CAN NOT know what experimental add-on designer B made. You can do a lot of stuff with these add-ons and it's possible to change the game itself in many ways. That on the other hand just creates some add-on that are just incompatible and this can not be fixed by the core game, imho. At least not without destroying most of the existing add-ons, because it's feature are blocked.
Considering the menu points - some menu points in Wesband don't have a function, they work as kind of a "headline". It is an easy way to sort options:
For example make an option for "Swords" under which all possible swords can be equipped. But as Ravana said: we don't even know what you want. You will get no answers you want in the way you post. Also it seems you jump to conclusions and make conclusions that are not correct:
such as above: the experimental add-on designer A CAN NOT know what experimental add-on designer B made. You can do a lot of stuff with these add-ons and it's possible to change the game itself in many ways. That on the other hand just creates some add-on that are just incompatible and this can not be fixed by the core game, imho. At least not without destroying most of the existing add-ons, because it's feature are blocked.
The future belongs to those, who believe in the beauty of their dreams.
Developer of: Trapped, Five Fates, Strange Legacy, Epical, UR Epic Era
Dungeonmasters of Wesnoth, Wild Peasants vs Devouring Corpses, Dwarf Dwarfson Dwarvenminer
Developer of: Trapped, Five Fates, Strange Legacy, Epical, UR Epic Era
Dungeonmasters of Wesnoth, Wild Peasants vs Devouring Corpses, Dwarf Dwarfson Dwarvenminer
-
- Posts: 67
- Joined: November 17th, 2023, 7:33 pm
addon code #1: fixing addon road movement bonus
these are the errorless approved addons with no errors from limited testing
color changer
corpse mod
zombie variation
breeze modification
unitmarker
fencing fencer
non fatal wounds extended
these work without any problems in combinations with each other
these were tested in
- more than 1 singlplayer campaigns (aka: 'campaign button in game')
- more than 1 mutiplayer maps (various maps/games in mutiplayer)
and no errors happened from limited playtests
there arent many addons that improve the overall of the game itself (meaning the playing experience and/or usability like corpose mod or color changer) but these were what i focused on
other things may do that (like 'fractions/classes' or 'maps') but those arent things that fundamentally improves the overall of this game (not sure how to really describe this part, its hard to explain) - but those mods above are examples
advance wars (fork version) adds a few good features, but very few like really 1 or 2 (most of it is just different, and more importantly its not noticeably different in game) and im not sure if that one is buggy)
there may have been other ones without bugs but i dont think they added anything that were either
1 useful
2 important
3 or significant
4 or were well done
to the game
so were uninstalled
just tested fencing fencer right now
in mutiplayer > local game (aka: a regular map/game)
and its funny (counts as #4)
and games are about fun
road movement
doesnt show any errors in mutiple singleplayer and multiplayer maps
but its very unclear what it exactly its suppose to do so its hard to tell if its bugged
its definitely bugged before i had uninstalled all addons
but it may have been (other addons or 'mutiplayer' option) affecting this addon but seems this addon is just bugged
with only addons that are approved
road movement increase set to 50%
what its doing is when a unit is next to a 'road hex/tile'
and its increasing their movement but the movement increase is off mathematically (not 50%)
another thing its doing is when its not even next to a 'road hex/tile', its sometimes increasing movement (seems very random)
in past with different addons before uninstalled
on different maps and different campagins, some of the problems seem were:
your units and enemy units movement would be decreased to like 3-0 (so you couldnt even move it when it was 0) - for mutiple turns - and their movement would change ever single turn
how exactly would the code in this be fixed
and what in this addon code needs to be fixed or looked at in detail ?
color changer
corpse mod
zombie variation
breeze modification
unitmarker
fencing fencer
non fatal wounds extended
these work without any problems in combinations with each other
these were tested in
- more than 1 singlplayer campaigns (aka: 'campaign button in game')
- more than 1 mutiplayer maps (various maps/games in mutiplayer)
and no errors happened from limited playtests
there arent many addons that improve the overall of the game itself (meaning the playing experience and/or usability like corpose mod or color changer) but these were what i focused on
other things may do that (like 'fractions/classes' or 'maps') but those arent things that fundamentally improves the overall of this game (not sure how to really describe this part, its hard to explain) - but those mods above are examples
advance wars (fork version) adds a few good features, but very few like really 1 or 2 (most of it is just different, and more importantly its not noticeably different in game) and im not sure if that one is buggy)
there may have been other ones without bugs but i dont think they added anything that were either
1 useful
2 important
3 or significant
4 or were well done
to the game
so were uninstalled
just tested fencing fencer right now
in mutiplayer > local game (aka: a regular map/game)
and its funny (counts as #4)
and games are about fun
road movement
doesnt show any errors in mutiple singleplayer and multiplayer maps
but its very unclear what it exactly its suppose to do so its hard to tell if its bugged
its definitely bugged before i had uninstalled all addons
but it may have been (other addons or 'mutiplayer' option) affecting this addon but seems this addon is just bugged
with only addons that are approved
road movement increase set to 50%
what its doing is when a unit is next to a 'road hex/tile'
and its increasing their movement but the movement increase is off mathematically (not 50%)
another thing its doing is when its not even next to a 'road hex/tile', its sometimes increasing movement (seems very random)
in past with different addons before uninstalled
on different maps and different campagins, some of the problems seem were:
your units and enemy units movement would be decreased to like 3-0 (so you couldnt even move it when it was 0) - for mutiple turns - and their movement would change ever single turn
how exactly would the code in this be fixed
and what in this addon code needs to be fixed or looked at in detail ?
-
- Posts: 67
- Joined: November 17th, 2023, 7:33 pm
addon code: reflections
reflections has this error from the beginning (from all addons being uninstalled and later on eventually installing only 1 addon each time)
how exactly would anyone fix this error, to update it, and reload/publish it, and why would that fix work for this type of error, w/e this type of error is
this error always showed in 'multiplayer' or anywhere else
20231211 20:07:34 warning preprocessor: Redefining macro VILLAGE_PROBABILITY without explicit #undef at ~add-ons/Reflection/reflection.cfg:532
included from ~add-ons/Reflection/_main.cfg:10
previously defined at core/terrain-graphics/new-macros.cfg:3851
included from core/_main.cfg:15
included from _main.cfg:18
20231211 20:29:26 error general: Duplicate terrain code definition found for ^Ftr
Failed to add terrain tropical_forest (Forest) []
which conflicts with rainforest (Forest) [forest]
20231211 18:33:58 warning preprocessor: Redefining macro VILLAGE_PROBABILITY without explicit #undef at ~add-ons/Reflection/reflection.cfg:532
included from ~add-ons/Reflection/_main.cfg:10
previously defined at core/terrain-graphics/new-macros.cfg:3851
included from core/_main.cfg:15
included from _main.cfg:18
how exactly would anyone fix this error, to update it, and reload/publish it, and why would that fix work for this type of error, w/e this type of error is
this error always showed in 'multiplayer' or anywhere else
20231211 20:07:34 warning preprocessor: Redefining macro VILLAGE_PROBABILITY without explicit #undef at ~add-ons/Reflection/reflection.cfg:532
included from ~add-ons/Reflection/_main.cfg:10
previously defined at core/terrain-graphics/new-macros.cfg:3851
included from core/_main.cfg:15
included from _main.cfg:18
20231211 20:29:26 error general: Duplicate terrain code definition found for ^Ftr
Failed to add terrain tropical_forest (Forest) []
which conflicts with rainforest (Forest) [forest]
20231211 18:33:58 warning preprocessor: Redefining macro VILLAGE_PROBABILITY without explicit #undef at ~add-ons/Reflection/reflection.cfg:532
included from ~add-ons/Reflection/_main.cfg:10
previously defined at core/terrain-graphics/new-macros.cfg:3851
included from core/_main.cfg:15
included from _main.cfg:18
- Pentarctagon
- Project Manager
- Posts: 5592
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: addon code: reflections
It just means that the same macro name was defined multiple times.
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: addon code: reflections
You have not described any errors in this post.
-
- Posts: 67
- Joined: November 17th, 2023, 7:33 pm
graphics: pixels / resolutions / vector art / graphics art stuff in gamess
what resolution are default units meant and designed for, which is optimal res
what resolution are addon units meant and designed for, which is optimal res
whats max resolution of display/screen for each, that's optimal for each
what size to resolution ratio default units are designed and meant for, which is optimal size and res combination
what size to resolution ratio addon units are designed and meant for usually and on average, which is optimal size and res combination
some units in some campaign/maps are very difficult to see, not sure if its a design problem, a color problem, a pixel problem, a visual design problem, a terrain problem, a map problem, a resolution problem, or all of the above
other games of this type do not have this problem (sometimes)
for current wesnoth version, or/and w/e is next version
related
New Graphics System Details
viewtopic.php?t=55695
https://wiki.wesnoth.org/Scaling_Digital_Images
what resolution are addon units meant and designed for, which is optimal res
whats max resolution of display/screen for each, that's optimal for each
what size to resolution ratio default units are designed and meant for, which is optimal size and res combination
what size to resolution ratio addon units are designed and meant for usually and on average, which is optimal size and res combination
some units in some campaign/maps are very difficult to see, not sure if its a design problem, a color problem, a pixel problem, a visual design problem, a terrain problem, a map problem, a resolution problem, or all of the above
other games of this type do not have this problem (sometimes)
for current wesnoth version, or/and w/e is next version
related
New Graphics System Details
viewtopic.php?t=55695
https://wiki.wesnoth.org/Scaling_Digital_Images
-
- Posts: 67
- Joined: November 17th, 2023, 7:33 pm
unanswered: graphics / art stuff: cgi vfx shadows etc stuff
unanswered:
who: for whoever does the graphics code stuff in wesnoth
why basically cant jpeg 'store transparency data'
why would units need to 'store transparency data' - does it affect how it looks
what does transparency have to do with how units look, are many units in total currently using 'transparency data' within the units ?
with images, why are there 'performance and graphical glitch issues' - is that a wesnoth code problem
is that part outdated info?
fractions/classes in era magic units have larger units and dont think therse any 'performance and graphical glitch issues' ? any examples if there are?
related / ref
https://wiki.wesnoth.org/Creating_Unit_ ... ifications
who: for whoever does the graphics code stuff in wesnoth
why basically cant jpeg 'store transparency data'
why would units need to 'store transparency data' - does it affect how it looks
what does transparency have to do with how units look, are many units in total currently using 'transparency data' within the units ?
with images, why are there 'performance and graphical glitch issues' - is that a wesnoth code problem
is that part outdated info?
fractions/classes in era magic units have larger units and dont think therse any 'performance and graphical glitch issues' ? any examples if there are?
related / ref
https://wiki.wesnoth.org/Creating_Unit_ ... ifications
Last edited by needmoreplayers on December 24th, 2023, 12:25 pm, edited 1 time in total.
Re: graphics: pixels / resolutions / vector art / graphics art stuff in gamess
Units are expected to be 72x72.
Re: graphics / art stuff: cgi vfx shadows etc stuff
jpeg has nothing wesnoth-specific, feel free to google. And feel free to convert unit to jpeg and back and try it how it looks.
Images covering multiple hexes can have issues of redrawing only main unit hex, leaving parts of image on nearby hexes.
Images covering multiple hexes can have issues of redrawing only main unit hex, leaving parts of image on nearby hexes.