Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added DLC items from TGA tables #49

Closed
wants to merge 1 commit into from

Conversation

Latebricole
Copy link

@Latebricole Latebricole commented Jun 26, 2024

Hey, I converted the TGA tables for the DLC items so they can be modified here

I know you mentioned here that you'll need to think about how to gate DLC content to avoid people getting banned, but I figured somebody might find this useful in the meantime.

@oospack
Copy link

oospack commented Jun 28, 2024

Could you compile this into an executable?

@0xRyN
Copy link

0xRyN commented Jun 29, 2024

Functional on my side. I'm now digging into bosses event id's.

er-save-editor.zip here is the executable @oospack

@Latebricole
Copy link
Author

Latebricole commented Jun 29, 2024

fwiw I've gotten all the other event flags on a local branch (bosses/cookbooks/maps/graces), but I haven't figured out how to map event ids to offsets into the EventFlags array in the save file to get them working

@0xRyN
Copy link

0xRyN commented Jun 29, 2024

nice! If you still didn't figure it out, share it and I'll also take a look at it.

btw, I submitted a PR #52 which includes this one and adds the ability to modify dlc related stats. We can continue on it and we will just have to figure this mapping out and the project will almost be complete for the DLC

@RageMeSenpai
Copy link

@0xRyN Am I just stupid or why does the executable crash when I try to open it?

@0xRyN
Copy link

0xRyN commented Jun 30, 2024

@0xRyN Am I just stupid or why does the executable crash when I try to open it?

Idk, works for me have no idea why

@rajathjn
Copy link

rajathjn commented Jun 30, 2024

@0xRyN Am I just stupid or why does the executable crash when I try to open it?

@0xRyN Happened to me as well. I don't have any knowledge of rust whatsoever. But I feel it's erroring out while fetching the icon.png file.

PS C:\Users\rajath\Downloads> $env:RUST_BACKTRACE="full"
PS C:\Users\rajath\Downloads\ER-Save-Editor-master> .\er-save-editor.exe
thread 'main' panicked at src/main.rs:31:40:
Failed to get image data
stack backtrace:
   0:     0x7ff7413a07c8 - <unknown>
   1:     0x7ff7413c04e9 - <unknown>
   2:     0x7ff74139ca81 - <unknown>
   3:     0x7ff7413a05a6 - <unknown>
   4:     0x7ff7413a26a8 - <unknown>
   5:     0x7ff7413a2317 - <unknown>
   6:     0x7ff7413a2bd8 - <unknown>
   7:     0x7ff7413a2a97 - <unknown>
   8:     0x7ff7413a113f - <unknown>
   9:     0x7ff7413a2748 - <unknown>
  10:     0x7ff74147ca04 - <unknown>
  11:     0x7ff7413be51d - <unknown>
  12:     0x7ff74147c9ce - <unknown>
  13:     0x7ff7408754ed - <unknown>
  14:     0x7ff7409e27b5 - <unknown>
  15:     0x7ff7409750d3 - <unknown>
  16:     0x7ff740961396 - <unknown>
  17:     0x7ff7407b70fc - <unknown>
  18:     0x7ff741398efe - <unknown>
  19:     0x7ff7407b70ca - <unknown>
  20:     0x7ff7409e3d39 - <unknown>
  21:     0x7ff74147a320 - <unknown>
  22:     0x7ffbb800257d - BaseThreadInitThunk
  23:     0x7ffbb968af28 - RtlUserThreadStart

@0xRyN
Copy link

0xRyN commented Jun 30, 2024

@0xRyN Am I just stupid or why does the executable crash when I try to open it?

@0xRyN Happened to me as well. I don't have any knowledge of rust whatsoever. But I feel it's erroring out while fetching the icon.png file.

Yeah it's a problem with the icon, this line of code to be precise. I'm not a rust developer, so I don't know how to fix it. Running the .exe straight from the zip file works for me though

#[derive(RustEmbed)]
#[folder = "icon/"]
struct Asset;

let image = Asset::get("icon.png").expect("Failed to get image data").data; // Exception here

@nozwock
Copy link

nozwock commented Jul 16, 2024

I know you mentioned here that you'll need to think about how to gate DLC content to avoid people getting banned, but I figured somebody might find this useful in the meantime.

If there's no good way to figure out whether the user has the DLC active just from the save alone, you could always just ask the user whether to show DLC related stats and items in the editor.

@nozwock
Copy link

nozwock commented Jul 16, 2024

Yeah it's a problem with the icon, this line of code to be precise. I'm not a rust developer, so I don't know how to fix it. Running the .exe straight from the zip file works for me though

#[derive(RustEmbed)]
#[folder = "icon/"]
struct Asset;

let image = Asset::get("icon.png").expect("Failed to get image data").data; // Exception here

@0xRyN
Did you upload a debug build? If so, the icon is not embedded within the binary, and it'll look for it relative to the binary path.

It should work otherwise.

@0xRyN
Copy link

0xRyN commented Jul 16, 2024

Yeah it's a problem with the icon, this line of code to be precise. I'm not a rust developer, so I don't know how to fix it. Running the .exe straight from the zip file works for me though

#[derive(RustEmbed)]
#[folder = "icon/"]
struct Asset;

let image = Asset::get("icon.png").expect("Failed to get image data").data; // Exception here

@0xRyN
Did you upload a debug build? If so, the icon is not embedded within the binary, and it'll look for it relative to the binary path.

It should work otherwise.

@nozwock I just ran cargo build iirc, im not familiar with Rust / Cargo. What would be the solution ?

@nozwock
Copy link

nozwock commented Jul 16, 2024

@0xRyN

cargo build --release

This will build it in release mode, the binary then should have the icon embedded within itself.

Or, you could make this change in the Cargo.toml so that the resources are embedded even in a debug build.

- rust-embed = "8.3.0"
+ rust-embed = { version = "8.3.0", features = [ "debug-embed" ] }

@nozwock
Copy link

nozwock commented Jul 16, 2024

@nozwock
Copy link

nozwock commented Jul 16, 2024

@twp2000 You're not on the latest version of ER, are you? Because they're not supported yet (1.12.3/1.12.4).

nozwock added a commit to nozwock/ER-Save-Editor that referenced this pull request Jul 17, 2024
@Latebricole Latebricole closed this by deleting the head repository Feb 1, 2025
@nozwock
Copy link

nozwock commented Feb 1, 2025

I presume this has been closed due to #43, #43 (comment) adding support for the DLC in the lib repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants