Jump to content

1.18 Waypoint Icon Names? (NOT solved)


dakko
Go to solution Solved by dakko,

Recommended Posts

I'd like to update my macros using the new 1.18 waypoint icons.

Does anyone know the new icon names?.

EDIT 3/6/23: Although I did find the file names, using them to create a waypoint only produces the default circle on the map.

I'm not able to unmark 'solution' -- this problem is not solved. :(

 

The files are in ...assets/survival/textures/icons/worldmap

The default .svg file names (as of 1.18-pre3):

0-circle
01-turnip
02-grain
03-apple
04-berries
05-mushroom
bee
cave
Gear
gravestone
home
ladder
pick
rocks
ruins
skull_and_crossbones
spiral
star1
star2
trader
tree
tree2
vessel
x

Edited by dakko
not solved after all
Link to comment
Share on other sites

  • dakko changed the title to 1.18 Waypoint Icon Names?
  • Solution

Found it!

They are in ...assets/survival/textures/icons/worldmap

The default .svg file names (as of 1.18-pre3):

0-circle
01-turnip
02-grain
03-apple
04-berries
05-mushroom
bee
cave
Gear
gravestone
home
ladder
pick
rocks
ruins
skull_and_crossbones
spiral
star1
star2
trader
tree
tree2
vessel
x

Edited by dakko
additional details
  • Like 2
Link to comment
Share on other sites

just encountered this in official discord #gamedev channel:

line 87 of the Systems/WorldMap/WaypointLayer/WaypointMapLayer.cs:

var icons = api.Assets.GetMany("textures/icons/worldmap/", null, false);

 

The previous code was:

public List<string> WaypointIcons { get; set; } = new List<string>()
    {
    "circle", "bee", "cave", "home", "ladder", "pick", "rocks", "ruins", "spiral", "star1", "star2", "trader", "vessel"
    };

 

the default icon is still "circle" though...

public string Icon = "circle";

Link to comment
Share on other sites

Thank you, BenLi!!

So it looks like you cannot actually use the new icons when making macros, is that correct? That would explain why my new macros create circles instead of the new icons.  :(

Has this been discussed in the discord channel, or anyone give an example of a macro that uses the new 1.18 icons?

 

eta: Oh! Wait a second, I misread your post. I'll give that command a try as soon as I can, later today.

Edited by dakko
Link to comment
Share on other sites

15 hours ago, BenLi said:

just encountered this in official discord #gamedev channel:

line 87 of the Systems/WorldMap/WaypointLayer/WaypointMapLayer.cs:

var icons = api.Assets.GetMany("textures/icons/worldmap/", null, false);

 

The previous code was:

public List<string> WaypointIcons { get; set; } = new List<string>()
    {
    "circle", "bee", "cave", "home", "ladder", "pick", "rocks", "ruins", "spiral", "star1", "star2", "trader", "vessel"
    };

 

the default icon is still "circle" though...

public string Icon = "circle";

Apparently I don't know how to use that command. How does one use this to get the icon names?

When using the file names, the macros do not work correctly. Well, at least not the grain icon. :(

  • Like 1
Link to comment
Share on other sites

  • dakko changed the title to 1.18 Waypoint Icon Names? (NOT solved)

var icons = api.Assets.GetMany("textures/icons/worldmap/", null, false);

var capi = api as ICoreClientAPI;

foreach (var icon in icons)

{

string name = icon.Name.Substring(0, icon.Name.IndexOf("."));

name = Regex.Replace(name, @"\d+\-", "");

 

look at the Replace function call replacing each name containing ENTER, backslash, - or + with empty.

I am not sure but it might work for 02-grain.svg file as for "02grain"

Can you please check?

Can you also check for non-numbered icons such as home/star1?

 

Upd: probably need to read svg in notepad and look for name tag in there...

Edited by BenLi
Link to comment
Share on other sites

Thank you, BenLi. I'm sorry that I'm lacking the basic knowledge that would allow me to understand what you've written (for instance, I cannot find WaypointMapLayer.cs; I cannot even find the file structure that it is supposed to be in).

I've tried 02grain as you have asked, but it does not work either.

My old macros [for "pick", "rocks", "trader", "ladder" (I happened to use them, I was not actually testing)] do work, and their names happen to correspond to the .svg file names within textures/icons/worldmap. Their names also match what is found in line 18 of their .svg file (sodipodi:docname=)

Line 18 for 02-grain.svg reads: sodipodi:docname="VS_icons_wheat_S.svg">

I see that star1 shows sodipodi:docname="star4.svg" -- I can test that one and see if the macro for it still works in 1.18 or not.

I won't be able to test anything until later today though.

Btw, 01-turnip, 03-apple, 04-berries, 05-mushroom, skull_and_crossbones, tree, tree2 and x have a completely different format and do not contain "docname"

I appreciate your help! Thank you!

Link to comment
Share on other sites

The thanks go to VS team, this time a little sarcastic :)

Unfortunately I didn't install 1.18 yet. I will download the tarball and look into its svg files.

 

The code I am mentioning is in

https://github.com/anegostudios/vsessentialsmod/tree/master/Systems/WorldMap/WaypointLayer folder

The file is WaypointMapLayer.cs in the bottom.

Lines 87-93 as per 1.18.0 pre-5.

Link to comment
Share on other sites

talked to few VERY smart guys in DS.

They say the following:

var icons = api.Assets.GetMany("textures/icons/worldmap/", null, false);

this code loads all files from textures/icons/worldmap/ and adds the file name as icon name

 

string name = icon.Name.Substring(0, icon.Name.IndexOf("."))

This code cuts .svg extension from the icon name stored after assets loading.

 

name = Regex.Replace(name, @"\d+\-", "");

this code cuts the prefixing digits plus "-" character and replaces it with empty string.

 

Therefore "0-circle.svg" icon name should become "circle"

 

Need to re-check the circle grain turnip apple names.

additional clue would be also to create the waypoint manually, and see its name via "/waypoint list". Probably the icon name may be mentioned there...

Link to comment
Share on other sites

  • 5 months later...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.