Coder Social home page Coder Social logo

Comments (36)

TalicZealot avatar TalicZealot commented on September 3, 2024

I could, but this is another case where it's stepping outside of the scope of the original Randomizer, so individually adding support for features like this isn't very practical or the goal of this tool. Maybe I can add another system to parse custom locations.

To do that the json would have to provide an array of the new custom locations and their info.
For example:

"customLocations": [{
    "location": "Bekatowa",
    "row": 38,
    "col": 111,
    "rooms": [
        {"address": "0x06BC61", "values": ["0x01","0x04"]},
        {"address": "0x06BC51", "values": ["0x01","0x04"]}
    ]
  }]

The rooms array is a list of rooms on the minimap in ram, from which the location can be checked or peeked. The values need to be checked manually by assessing what positions are reasonable for peeking and which ones could be problematic. Sometimes compromises are necessary.

from sotnrandotools.

eldri7ch avatar eldri7ch commented on September 3, 2024

Why are there two instances of "{"address": "0x06BC61", "values": ["0x01","0x04"]}"? Is that simply to offer example that multiple rooms could be required for a single check?

from sotnrandotools.

TalicZealot avatar TalicZealot commented on September 3, 2024

A location can potentially be checked or peeked from multiple rooms on the map. Those are two different rooms, the second address ends in 0x51. The map in ram is actually not represented in bytes but nibbles (half bytes) and each nibble has 4 bit toggles per quadrant of uncovered map, so there can be multiple values that represent a checked or peeked location that needed to be accounted for. This could also be done with bit mask checks, but it hasn't been necessary for me to convert everything to that.

from sotnrandotools.

eldri7ch avatar eldri7ch commented on September 3, 2024

OK, I will assemble that, then. Thanks for the explanation.

from sotnrandotools.

eldri7ch avatar eldri7ch commented on September 3, 2024

OK, so how would that work, then, if the preset file I am using is inheriting the checks from Casual or Nimble? Should I just include the "customLocations" language in the preset files utilizing the extension?

from sotnrandotools.

TalicZealot avatar TalicZealot commented on September 3, 2024

Oh I see what you mean, I totally forgot about how the extensions are defined. Hmmm I guess this doesn't work then.

from sotnrandotools.

TalicZealot avatar TalicZealot commented on September 3, 2024

I just don't want to commit to adding stuff like this manually every time. You might test these and it could turn out that half of them are dumb and need replacing.
How about this: For a custom extension make a json with that name holding the customLocations array. That would need to be put in the tracker presets folder. When the tracker sees an extension it doesn't recognize it will look there. So in this case it would be tourist.json.

from sotnrandotools.

eldri7ch avatar eldri7ch commented on September 3, 2024

That's a great idea. Will do.

from sotnrandotools.

eldri7ch avatar eldri7ch commented on September 3, 2024

Trying to research how to get the data needed for this, what does row and column refer to? I can get the map addresses and the values, but the row and column are throwing me off.

from sotnrandotools.

TalicZealot avatar TalicZealot commented on September 3, 2024

Those are coordinates to a room pixel in GPU ram. I think I used to have an easy way of calculating that by referencing the map image, but I don't remember at the moment. I will check tomorrow. If you want to play around with it the map texture starts at 0x08AE80 and every row is offset by 0x800, where every byte colors two pixels. So it must be something like get the raw 240x280 map and measure the center of the room then divide the x by 2.

from sotnrandotools.

TalicZealot avatar TalicZealot commented on September 3, 2024

I've decided that my old way of doing those coordinates is really stupid, because it goes all the way back to the Lua tracker when I really didn't understand what was going on. So I'm going to be changing it to simply x,y coordinates on the map texture and I'll do any necessary math in code. Location coordinates will reflect the top left pixel of the room(internal part without border) or top left pixel of the location (for equipment locations which are a 2x2 square). Here are reference images of the map textures with increased visibility:
normal
inverted

New json signature would be:

"customLocations": [{
    "location": "JewelOfOpen",
    "x": 197,
    "y": 62,
    "secondCastle": false,
    "rooms": [
        {"address": "0x06BCC0", "values": ["0x10"]},
    ]
  }]

from sotnrandotools.

eldri7ch avatar eldri7ch commented on September 3, 2024

I will move forward with this, then.

from sotnrandotools.

eldri7ch avatar eldri7ch commented on September 3, 2024

When looking for "Values" Are you asking for all related values or just the bit that refers to that specific room?

so do you need this: "values": ["0x55","0x05","0x01"] or would just "values": ["0x01"] suffice since only one bit needs to be calculated as filled?

from sotnrandotools.

eldri7ch avatar eldri7ch commented on September 3, 2024

Anyway, here's the file

tourist.json

from sotnrandotools.

TalicZealot avatar TalicZealot commented on September 3, 2024

or would just "values": ["0x01"] suffice

Yes that is enough for cases when that is the only viewable position.

from sotnrandotools.

TalicZealot avatar TalicZealot commented on September 3, 2024

Actually never mind, don't need a PPF because I realized this should also be possible for custom seeds, so I changed the settings a bit to allow for that. Another thing that might be a good idea to support would be if the checks should be shown as rooms or locations on the map like for equipment. This seems correct to me:
test

from sotnrandotools.

eldri7ch avatar eldri7ch commented on September 3, 2024

Perfect!

from sotnrandotools.

TalicZealot avatar TalicZealot commented on September 3, 2024

Implemented in 1.6.5

from sotnrandotools.

eldri7ch avatar eldri7ch commented on September 3, 2024

How will "Out of Logic" be handled? Just add the new checks in "lockLocationsAllowed" to the json files using those checks? Even if those checks' logic is inherited from another preset?

from sotnrandotools.

TalicZealot avatar TalicZealot commented on September 3, 2024

I don't parse logic inheritance at all. With the base presets I don't have to since casual and speedrun are baselines. For custom locations you would need to provide that information in the preset.

from sotnrandotools.

TalicZealot avatar TalicZealot commented on September 3, 2024

Alternatively you can add normal locks to casual and ool to speedrun, that's what I did to accommodate equipment locations.

from sotnrandotools.

eldri7ch avatar eldri7ch commented on September 3, 2024

I did add them there, so if I move that JSON over, it will add their OOL to the tracker?

from sotnrandotools.

TalicZealot avatar TalicZealot commented on September 3, 2024

The standard Out of Logic locks are grabbed from the speedrun preset and the normal locks from casual. Preset locks are loaded on top of that and can overwrite the defaults.

from sotnrandotools.

eldri7ch avatar eldri7ch commented on September 3, 2024

Then everything should be good!

from sotnrandotools.

eldri7ch avatar eldri7ch commented on September 3, 2024

The map doesn't accurately reflect the requirements for the checks. Also, it should be including the equipment checks. The only way to make it so that tourist didn't also increase the number of checks in Equipment was by ordering them so that Tourist also included all of the equipment checks.

Here are the files for Tourist, Casual, and Grand Tour which are the files involved.

grand-tour.json
casual.json
tourist.json
image

from sotnrandotools.

eldri7ch avatar eldri7ch commented on September 3, 2024

Here is a Grand Tour ppf in case it's needed.

Grand-Tour-MandalorianBus92.zip

from sotnrandotools.

TalicZealot avatar TalicZealot commented on September 3, 2024

Also, it should be including the equipment checks. The only way to make it so that tourist didn't also increase the number of checks in Equipment was by ordering them so that Tourist also included all of the equipment checks.

I don't understand what you mean by that. Are you saying the tourist extension also includes all the equipment locations? If so the extension json would need to include a field that indicates which extension it extends. We can also use inherits to maintain the preset convention.

{
  "extends": "equipment",
  "customLocations": [...]
}

from sotnrandotools.

TalicZealot avatar TalicZealot commented on September 3, 2024

The location Colosseum Green tea does not have consistent capitalization across files.

from sotnrandotools.

eldri7ch avatar eldri7ch commented on September 3, 2024

OK, let me fix both of those

from sotnrandotools.

eldri7ch avatar eldri7ch commented on September 3, 2024

tourist.json

Fixed

from sotnrandotools.

TalicZealot avatar TalicZealot commented on September 3, 2024

Reworked and implemented in 1.6.6

from sotnrandotools.

eldri7ch avatar eldri7ch commented on September 3, 2024

The tracker still shows no requirements for the additional checks. It shows the two in Chapel and Arena as well as the one in Caverns available to be checked with 0 relics.

from sotnrandotools.

eldri7ch avatar eldri7ch commented on September 3, 2024

image

It should be inheriting the check logic from Casual per the grand-tour.json. This is planned for simultaneous launch with an expedition-style preset that will inherit Nimble logic, so having the tourist.json inherit check logic from somewhere else isn't a good idea.

from sotnrandotools.

TalicZealot avatar TalicZealot commented on September 3, 2024

Can you make sure these locations are named identically in tourist.json, casual.json and speedrun.json

from sotnrandotools.

eldri7ch avatar eldri7ch commented on September 3, 2024

I'm the idiot. I went to do as you asked and realized that updating the tracker replaces the files in that folder with the native preset json. It works now. Thanks!

from sotnrandotools.

TalicZealot avatar TalicZealot commented on September 3, 2024

Oh yeah I suppose it would, totally didn't think about that. As long as nothing else comes up there won't be any updates so it won't be an issue.

from sotnrandotools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.