Skip to content

Commit 026048e

Browse files
authored
Merge pull request #29 from IceDynamix/dev
release v0.1.7 (game version 2.3)
2 parents 83c939d + 41be996 commit 026048e

7 files changed

+32
-24
lines changed

Cargo.toml

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "reliquary-archiver"
3-
version = "0.1.6"
3+
version = "0.1.7"
44
edition = "2021"
55
license = "MIT"
66
repository = "https://github.com/IceDynamix/reliquary-archiver"
@@ -23,8 +23,9 @@ ureq = { version = "2.9.7", features = ["json"] }
2323

2424
[dependencies.reliquary]
2525
git = "https://github.com/IceDynamix/reliquary"
26-
tag = "v1.0.1"
26+
tag = "v2.0.0"
2727

2828
[profile.release]
2929
opt-level = "z" # optimize for size
30-
lto = true
30+
lto = true
31+
overflow-checks = false # Disable integer overflow checks.

README.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@ made to be used with [fribbels hsr optimizer](https://github.com/fribbels/hsr-op
1717
sudo setcap CAP_NET_RAW=+ep target/release/reliquary-archiver
1818
```
1919
- download latest release from [here](https://github.com/IceDynamix/reliquary-archiver/releases/)
20-
- **make sure you're on the main menu screen before the train hyperdrive in-gmae**
20+
- **Launch the game and get to this screen. Do not go into the game yet**
21+
![main menu start screen](./hsr_hyperdrive.jpg)
2122
- run the archiver executable and wait until it says "listening with a timeout"
22-
- enter train hyperdrive in-gmae
23+
![archiver listening for timeout](./listening_for_timeout.png)
24+
- start the game
2325
- if successful, the archiver should output a file to `archiver_output.json`
26+
![archiver visual guide](./archiver_visual_guide.gif)
2427

2528
### cli usage
2629

archiver_visual_guide.gif

27.7 MB
Loading

hsr_hyperdrive.jpg

210 KB
Loading

listening_for_timeout.png

18.4 KB
Loading

src/export/fribbels.rs

+19-16
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ impl OptimizerExporter {
9292
.filter_map(|b| export_proto_hero(&self.database, &b))
9393
.collect();
9494

95-
self.current_trailblazer_path = trailblazer_id_to_path(hero.cur_basic_type.value() as u32);
95+
self.current_trailblazer_path = avatar_path_lookup(&self.database, hero.cur_basic_type.value() as u32);
9696
if let Some(path) = self.current_trailblazer_path {
9797
info!(path, "found current trailblazer path");
9898
} else {
@@ -176,7 +176,7 @@ impl Exporter for OptimizerExporter {
176176
let cmd = command.parse_proto::<GetHeroBasicTypeInfoScRsp>();
177177
match cmd {
178178
Ok(cmd) => {
179-
self.add_trailblazer_data(cmd)
179+
self.add_trailblazer_data(cmd);
180180
}
181181
Err(error) => {
182182
warn!(%error, "could not parse trailblazer data command");
@@ -313,7 +313,8 @@ impl Database {
313313

314314
// trailblazer
315315
if avatar_id >= 8000 {
316-
Some("Trailblazer".to_string())
316+
let path = avatar_path_lookup(self, avatar_id)?;
317+
Some(format!("Trailblazer{}", path))
317318
} else {
318319
let cfg = self.avatar_config.get(&avatar_id)?;
319320
cfg.AvatarName.lookup(&self.text_map).map(|s| s.to_string())
@@ -339,7 +340,7 @@ fn export_proto_relic(db: &Database, proto: &ProtoRelic) -> Option<Relic> {
339340
let slot = slot_type_to_export(&relic_config.Type);
340341
let rarity = relic_config.MaxLevel / 3;
341342
let mainstat = main_stat_to_export(&main_affix_config.Property).to_string();
342-
let location = db.lookup_avatar_name(proto.base_avatar_id).unwrap_or("".to_string());
343+
let location = db.lookup_avatar_name(proto.equip_avatar_id).unwrap_or("".to_string());
343344

344345
debug!(rarity, set, slot, slot, mainstat, location, "detected");
345346

@@ -478,7 +479,7 @@ fn export_proto_light_cone(db: &Database, proto: &ProtoLightCone) -> Option<Ligh
478479

479480
debug!(light_cone=key, level, superimposition, "detected");
480481

481-
let location = db.lookup_avatar_name(proto.base_avatar_id)
482+
let location = db.lookup_avatar_name(proto.equip_avatar_id)
482483
.unwrap_or("".to_string());
483484

484485
Some(LightCone {
@@ -514,7 +515,7 @@ fn export_proto_character(db: &Database, proto: &ProtoCharacter) -> Option<Chara
514515
}
515516

516517
fn export_proto_hero(db: &Database, proto: &HeroBasicTypeInfo) -> Option<Character> {
517-
let path = trailblazer_id_to_path(proto.basic_type.value() as u32)?;
518+
let path = avatar_path_lookup(db, proto.basic_type.value() as u32)?;
518519
let key = format!("Trailblazer{}", path);
519520

520521
let span = info_span!("character", key);
@@ -535,17 +536,19 @@ fn export_proto_hero(db: &Database, proto: &HeroBasicTypeInfo) -> Option<Charact
535536
})
536537
}
537538

538-
fn trailblazer_id_to_path(id: u32) -> Option<&'static str> {
539-
match id {
540-
8001 | 8002 => Some("Destruction"),
541-
8003 | 8004 => Some("Preservation"),
542-
8005 | 8006 => Some("Hunt"),
543-
8007 | 8008 => Some("Erudition"),
544-
8009 | 8010 => Some("Harmony"),
545-
8011 | 8012 => Some("Nihility"),
546-
8013 | 8014 => Some("Abundance"),
539+
fn avatar_path_lookup(db: &Database, avatar_id: u32) -> Option<&'static str> {
540+
let hero_config = db.avatar_config.get(&avatar_id);
541+
let avatar_base_type = hero_config.unwrap().AvatarBaseType.as_str();
542+
match avatar_base_type {
543+
"Knight" => Some("Preservation"),
544+
"Rogue" => Some("Hunt"),
545+
"Mage" => Some("Erudition"),
546+
"Warlock" => Some("Nihility"),
547+
"Warrior" => Some("Destruction"),
548+
"Shaman" => Some("Harmony"),
549+
"Priest" => Some("Abundance"),
547550
_ => {
548-
debug!(?id, "unknown path");
551+
debug!(?avatar_base_type, "unknown path");
549552
None
550553
}
551554
}

src/main.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ fn main() {
5454
if let Some(export) = export {
5555
let file = File::create(&args.output).unwrap();
5656
serde_json::to_writer_pretty(&file, &export).unwrap();
57-
info!("wrote output to {}", &args.output.display());
57+
info!("wrote output to {}", &args.output.canonicalize().unwrap().display());
5858
} else {
5959
warn!("skipped writing output");
6060
}
@@ -124,7 +124,8 @@ where
124124
if invalid >= 50 {
125125
error!("received 50 packets that could not be segmented");
126126
warn!("you probably started capturing when you were already in-game");
127-
warn!("the capture needs to start on the main menu screen before hyperdrive");
127+
warn!("the capture needs to start on the main menu screen");
128+
warn!("log out then log back in");
128129
return None;
129130
}
130131
} else {
@@ -176,7 +177,7 @@ where
176177
let mut invalid = 0;
177178
let mut warning_sent = false;
178179

179-
info!("instructions: go to main menu screen and go into train hyperdrive");
180+
info!("instructions: go to main menu screen and go to the \"Click to Start\" screen");
180181
info!("listening with a timeout of {} seconds...", args.timeout);
181182

182183
'recv: loop {

0 commit comments

Comments
 (0)