ESOUIMods / LoreBooks

An Elder Scrolls Online Addon which displays map pins for Shalidor's Library books and Eidetic Memory Scrolls
Other
1 stars 3 forks source link

PorygonA Updates #7

Open Sharlikran opened 1 year ago

Sharlikran commented 1 year ago

@PorygonA Okay lets just discuss in an issue rather then the comments section now that you are set up.

So the px and pyare the LibGps coordinates for the x, y location of the book. The tagpm` is the primary map ID for the pin. This means it is where you are standing when you get the information and the location the book is to be displayed primarily.

[7114] = { ["e"] = { [1] = { ["px"] = 0.0815220019, ["py"] = 0.5830836017, ["pm"] = 2114, }, }, }, { ["pnx"] = 0.7893669605, ["pny"] = 0.4129191339 }, -- Green Serpent Bounty, systres/u34_systreszone_base_0

The reason for the [7114] = { ["e"] = { and the rest is if it's a new book I have not entered yet. So what you really want is basically this part.

[1] = { ["px"] = 0.0815220019, ["py"] = 0.5830836017, ["pm"] = 2114, },

So essentially that is all you are adding. Then comes the hard part. We will use the book you want to update.

  [7114] = {
    ["cn"] = "Systres Tomes and Scrolls",
    ["n"] = "Green Serpent Bounty",
    ["e"] = {
    },
    ["c"] = false,
  },

The above is what you start with. Then you paste in the line I mentioned.

Step one

  [7114] = {
    ["cn"] = "Systres Tomes and Scrolls",
    ["n"] = "Green Serpent Bounty",
    ["e"] = {
      [1] = { ["px"] = 0.0815220019, ["py"] = 0.5830836017, ["pm"] = 2114, },
    },
    ["c"] = false,
  },

Add the line for the book.

Step two

  [7114] = {
    ["cn"] = "Systres Tomes and Scrolls",
    ["n"] = "Green Serpent Bounty",
    ["e"] = {
      [1] = { ["px"] = 0.0815220019, ["py"] = 0.5830836017, ["pm"] = 2114, },
    },
    ["c"] = true,
  },

Change ["c"] to true this means it has data in it.

Then you have to be a human. Is this on an overland map? If it is only an overland book you are done. If not now you have to ask are you in a city?

For the city remember you are in it at the time you get the book. So your map ID might be 2114 for example for that city. The fake pin slash command could return 10 as an example. I don't know what High Isle is but we will use 9999 to avoid confusion for what it really is. So with that pretend ID number this is how a pin looks when you are entering a pin for a city.

Step three, add the parent zone map ID

  [7114] = {
    ["cn"] = "Systres Tomes and Scrolls",
    ["n"] = "Green Serpent Bounty",
    ["e"] = {
      [1] = { ["px"] = 0.0815220019, ["py"] = 0.5830836017, ["pm"] = 2114, ["zm"] = 9999, },
    },
    ["c"] = true,
  },

Now with that it is complete. You have the pin location while you are standing in the city px, py, and pm and you have told Lorbooks that the parent zone is 9999 by adding that with ["zm"] = 9999,. When you are looking at the entire zone Lorebooks will know how to draw the book in both places.

Dungeon example

  [2011] = {
    ["c"] = true,
    ["cn"] = "Lore and Culture",
    ["n"] = "Mastery of Discipline",
    ["q"] = 4959,
    ["e"] = {
      [1] = { ["px"] = 0.2941044142, ["py"] = 0.3928760078, ["pm"] = 420, ["zx"] = 0.2927644048, ["zy"] = 0.3921875965, ["zm"] = 20, ["d"] = true, },
    },
  },

So this example is a dungeon pin. px, py and pm are the same. It is where you are when you are underground in the dungeon. So what is new is the ["d"] because that means you are in the dungeon since it is set to true. That prevents the pin from being drawn on the overland map off in some weird location you can not walk to.

What makes it draw on the overland map correctly is the zx, zy, and zm. They are the x and y locations of the pin where you are when you get the fake pin information. Which you normally get at the entrance to the delve. Dungeon usually means anything not a city or the overland map like a delve or undercroft.

So that is why the dungeon pin has two sets of coordinates. One set for where you are in the dungeon and one set for the overland map so people see a pin at about the entrance to the Delve.

Sharlikran commented 1 year ago

@PorygonA If you have any submissions just go ahead and make them. I wouldn't wait on me. I know I mentioned something I observed a while back but I am bound to forget something I did when I was developing the current syntax for the books. It could have been me so just take note of what I observed and then use the current syntax.

Don't wait for me I may not work on or correct something for a while. I am always going back and forth between projects.

PorygonA commented 1 year ago

I've been doing submissions to the current dev-porygona branch. Last commit I did was a Bastion Nymic book, and I believe I should be all up-to-date with the books. Should be good to update the add-on.

Sharlikran commented 1 year ago

@PorygonA I don't think I can use the changes, fiddlesticks. I can't tell but I think you changed the order of the books. Which I don't want the new books added in order nor do I want the order changed. It doesn't need to be in order to work properly.

The reason that I don't want the order changed is that it adds all kinds of mess to everything when I'm checking changes.

Sharlikran commented 1 year ago

image

Sharlikran commented 1 year ago

The game when you export all the books to the saved variables doesn't save anything in order. So I can't import changes from you and then output that in order. Then import yachoor's changes and put that in order and then any new books and put that in order. The my changes and put that in order. The game will randomly put everything in a different order then you put it.

Sharlikran commented 1 year ago

Another reason it's not good to reorder things is because Lua doesn't know you want one over the other.

[3047] = { -- and a bunch of stuff
}
[3047] = { -- and a bunch of stuff
}

The last one will be what the game uses and if things are reordered and then duplicated then maybe I put the changes in the first one. So then my changes don't show up because of the second one.

Sharlikran commented 1 year ago

I'm going to check that I didn't do that on my end and mess things up. I'm gonna reinstall with Minion.

PorygonA commented 1 year ago

Alrighty, the thing I'm going to do is download the most recent version of the add-on, and re-add the changes I made, minus the reordering

Sharlikran commented 1 year ago

No don't do it. Because as I am thinking about it you went to a lot of trouble, probably hours if not days. I'm just going to work with it because I do appreciate it and while I don't normally do things like that if it helps then it helps.

Sharlikran commented 1 year ago

I'll figure it out.

PorygonA commented 1 year ago

Okay, gotcha. Um. Ignore all the commits I made today then. 😛

It actually surprisingly did not take that long! Few hours-ish.

PorygonA commented 10 months ago

Hi;

Sorry to bother you: The changes I submitted on September 21, 2023 was not added with the most recent update.

Sharlikran commented 10 months ago

I just updated the edidic memory issue. I haven't had time to look at anything. It wasn't an oversight.

PorygonA commented 10 months ago

Gotcha, understood! Again, sorry to bother you, just wanted to be sure.

Have a good one :)

Sharlikran commented 10 months ago

No bother, just letting you know. I'm not working on much right now.

Sharlikran commented 9 months ago
  [5897] = {
    ["c"] = false,
    ["cn"] = "Solitude Soliloquies",
    ["n"] = "Bards College Salskap Tonight!",
    ["q"] = 6482,
    ["e"] = {
    },
  },

Changed to

  [5897] = {
    ["c"] = true,
    ["cn"] = "Solitude Soliloquies",
    ["n"] = "Bards College Salskap Tonight!",
    ["q"] = 6482,
    ["e"] = {
      [1] = { ["qp"] = true, },
    },
  },

I can't accept that because there is no book location. I understand you need to be on the quest but the whole information needs to be present.

PorygonA commented 9 months ago

It goes straight into your inventory during the quest, so it doesn't exactly have a location. It's similar to how the following are:

  [7292] = {
    ["c"] = true,
    ["cn"] = "Hearts and Flowers",
    ["n"] = "Letter From Ember",
    ["q"] = 6786,
    ["e"] = {
      [1] = { ["qc"] = true, },
    },
  },
  [7293] = {
    ["c"] = true,
    ["cn"] = "Hearts and Flowers",
    ["n"] = "Letter From Isobel",
    ["q"] = 6790,
    ["e"] = {
      [1] = { ["qc"] = true, },
    },
  },

These only have "qc"=true as the location, because they too go straight to the inventory.

Sharlikran commented 9 months ago

@PorygonA Copy any changes somewhere, delete the git folder for Lorebooks and open Git For Windows. It should say it can't find the folder and when it does clone it again. That will make the dev-PorygonA branch current with master so you can add more changes to it again.

PorygonA commented 9 months ago

I have finished that successfully! Submitted one small change to [6252] "The Undaunted Need You!", there were two ["c"], and I removed the one that was set to false and kept the one set to true.

Is deleting the Git and cloning again a task I should do on a semi-regular basis?

Sharlikran commented 9 months ago

Not really, maybe after each version or when I suggest it.

Sharlikran commented 4 months ago

You didn't rebase your branch for the newer versions. Don't worry about it for now, but in the future.

PorygonA commented 4 months ago

It should be good. I deleted, recloned, and it fetched upstream again so it should all be good.