Samase
Aug 10 2017, 6:15 pm
By: Neiv
Pages: < 1 4 5 6 7 >
 

Nov 26 2019, 3:18 pm Neiv Post #101



Technically correct file that gets loaded is rc3.json, but samase should be able to support both xml and json files for these sorts of string tables, so you can edit either one of them. (If you edit both, xml will take priority however)

In future blizz may be adding any new strings only to the .json file though, so if you want to edit some string that was added in a patch (Maybe relevant for some new UI features?), it is a good idea to extract a new .jsons and check them. But even then adding any new strings with matching <id> to .xml is supposed to work and get noticed by BW.



None.

Nov 26 2019, 3:44 pm IlyaSnopchenko Post #102

The Curious

Ah, I see, thanks.



Who am I, and why should I care?

Dec 7 2019, 6:50 pm IlyaSnopchenko Post #103

The Curious

I get the "Warning: Json decode error expected value at line 1 column 1" message when compiling but I'm not sure what file this pertains to. Everything seems to work fine in the game, all the strings are loading. I have removed the .xml versions from the build.

So far I have modded four .json files in the rez\ folder:
GluHist.json
Network.json
RC3.json (duh)
Stat_txt.json

How do I find what is causing the warning? Guess I'll have to exclude them one by one but then RC3 and stat_txt are long, it may take a while to find the offending string (if there's any).



Who am I, and why should I care?

Dec 7 2019, 11:39 pm Neiv Post #104



The forwards-compatible string table feature didn't actually work if you added blizzard's own json files to the mod. I updated the download and now it should accept those jsons fine.

(It obviously works for you currently but risks crashes if blizzard adds new strings to the json files; samase is supposed to be able to merge the json you give it with current one in casc)



None.

Dec 8 2019, 4:01 pm IlyaSnopchenko Post #105

The Curious

Thanks. So how do I do that? Create a JSON file with the same name but only the strings I want changed? And how much of the text do I have to include?

(See screenshot) Is that (selected bit) about enough for one entry? Do I also have to include the [] brackets that frame the whole document?
It'd be a little tedious, of course, since RC3 and Stat_txt are long and the entries in question are all over the place. But oh well.

Attachments:
json-editing.jpg
Hits: 0 Size: 206.71kb



Who am I, and why should I care?

Dec 9 2019, 12:16 am Neiv Post #106



You don't have to do anything and it will work, as long as you use the new version of samase that is able to read the jsons correctly when compliing.

-----------

But technically, yes, a stat_txt.json containing only
Quote
[
{
"id": "FIRST_UNIT_STRING-42",
"Key": "FIRST_UNIT_STRING-42",
"Value": "fat flying zerg\\u0000*\\u0000Air Units"
}
]
or alternatively stat_txt.xml
Quote
<strings>
<string>
<id>FIRST_UNIT_STRING_42</id>
<value>fat flying zerg</value>
</string>
</strings>
would work and rename just overlords, but why bother?

The point of the feature is to stay compatible without having to do any extra work if blizzard adds new strings in a patch.



None.

Dec 9 2019, 10:34 am IlyaSnopchenko Post #107

The Curious

Thanks. The more I think of it the more I'm seeing that it's a neat feature - not just because you don't have to carry a load of dead weight in the string tables (who cares about file sizes anymore LOL) but because you can avoid getting your own stuff lost among the boatloads of Blizzard lines. I know for a fact that I forgot to transfer a few lines from XML to JSON when hastily redoing my project for a new build compatible with 1.23.2. :)

I'll try to do it either way and see what sticks. I don't expect them to add new lines to Stat_txt, Network or GluHist, but RC3 looks like it's more in danger.

If only it was like this with some other stuff - say, I have to carry the whole bloody wireframe gfx set worth 120MB just to replace a few of the wires around. :)



Who am I, and why should I care?

Dec 18 2019, 5:29 pm jun3hong Post #108



Thank you for updating samase. Well... I have 2 problems.

1. I added a new stat_txt.xml(ex) rez/stat_txt.xml), but it couldn't packed. This is same for .json file.
I unpacked the original Starcraft file and there was an only .tbl file in 'rez' folder so I did the same thing.
But it didn't adapted the .tbl file to the unit name.

2. Does samase can operate with locales? I mean if I change the language, can unit name be changed?

Sorry for my bad English...



None.

Dec 18 2019, 7:24 pm IlyaSnopchenko Post #109

The Curious

I'm also having bit of an issue with strings. I edited the JSON file but some of the strings work (like unit names) and others (to be precise - Terran ranks I edited around) don't seem to catch.

Would stripping the JSON file down to only the strings I need altered - like you described earlier - help? I probably need to experiment again lol. :)



Who am I, and why should I care?

Dec 19 2019, 4:03 pm Neiv Post #110



I updated samase with a few fixes to the string table handling, try using it and see if it works by itself (Dl link)

Quote from jun3hong
1. I added a new stat_txt.xml(ex) rez/stat_txt.xml), but it couldn't packed. This is same for .json file.
I unpacked the original Starcraft file and there was an only .tbl file in 'rez' folder so I did the same thing.
But it didn't adapted the .tbl file to the unit name.
If the updated samase still doesn't work, what error are you getting?
I was able to edit Korean stat_txt and get it load fine at least. One thing you might want to make sure is that the file's text encoding is UTF-8. The files extracted from CASC have that encoding correctly, but maybe a text editor breaks things?

Quote
2. Does samase can operate with locales? I mean if I change the language, can unit name be changed?

Samase doesn't support having multiple versions of a same file for different locales, currently you'll have to distribute multiple versions of the mod if you want to have it in multiple languages.

I can try to look into it though if that is something that you need. No guarantees if I can make it work though; I have no idea if mimicking SCR's locale-aware lookup is easy or not.


Quote from IlyaSnopchenko
I'm also having bit of an issue with strings. I edited the JSON file but some of the strings work (like unit names) and others (to be precise - Terran ranks I edited around) don't seem to catch.

Would stripping the JSON file down to only the strings I need altered - like you described earlier - help? I probably need to experiment again lol. :)
Removing entries from the string table shouldn't solve anything. The latest dl link has a fix for rank strings (Or any string containing a hyphen in its key) randomly not working, so probably that fixes it for you.

Also note that there are two copies of rank strings in the string table for some reason.



None.

Dec 19 2019, 7:25 pm jun3hong Post #111



Actually I added that stat_txt.xml file which was extracted before 1.23.2 patch.
Maybe that'll be a problem I guess? I'll try again with a new one from current version.
I have to extract .xml file that from locales/enUS(or koKR or else)/Assets/rez - right?



None.

Dec 19 2019, 8:13 pm IlyaSnopchenko Post #112

The Curious

Quote from Neiv
I updated samase with a few fixes to the string table handling, try using it and see if it works by itself (Dl link)
Quote from IlyaSnopchenko
I'm also having bit of an issue with strings. I edited the JSON file but some of the strings work (like unit names) and others (to be precise - Terran ranks I edited around) don't seem to catch.

Would stripping the JSON file down to only the strings I need altered - like you described earlier - help? I probably need to experiment again lol. :)
Removing entries from the string table shouldn't solve anything. The latest dl link has a fix for rank strings (Or any string containing a hyphen in its key) randomly not working, so probably that fixes it for you.

Also note that there are two copies of rank strings in the string table for some reason.
Thanks. I'll update to 6.27 and see what happens.
The duplicate rank strings are there because there is one set for the vanilla game and one for Brood War (which is used by default, and it's towards the bottom of the file). I usually only bother to edit the BW one.



Who am I, and why should I care?

Dec 20 2019, 12:05 pm jun3hong Post #113



It worked! Looks like it's was a version problem.
Thank you for help!



None.

Jan 16 2020, 6:11 am Neiv Post #114



Released an update which adds two command-line arguments which can be used to speed up testing when launching a mod directly from a directory.

`--map <PATH>` launches directly into an UMS map, skipping all menus
`--no_hd` disables HD graphics (Switching to HD with F5 will mostly crash) to speed up the initial startup and reduce memory usage.

E.g. if you are testing something that requires restarting the game a lot, you can speed up things by using
Code
samase.exe C:\path\to\mod --map C:\path\to\map.scx --no_hd


(--no_hd may or may not make a big difference depending on your pc hardware. It did help me a lot.)



None.

Jan 16 2020, 5:01 pm IlyaSnopchenko Post #115

The Curious

Thanks. Is the rest of the program the same so that I don't have to recompile the executable I have uploaded for the co-author's sake?



Who am I, and why should I care?

Jan 17 2020, 2:44 pm Neiv Post #116



Right, no other changes.



None.

Jan 31 2020, 11:12 pm victorsena13 Post #117



Can someone plz explain to a total noob like me that doens't understand anything how to use this? i'm trying to use BWMetaAI and it seems the only way to use this AI is with this tool here



None.

Feb 2 2020, 9:47 pm Neiv Post #118



First you need the aiscript.bin file from BWMetaAI. I don't know if there's a direct download for it, if its download links only provide you with a .mpq file then you can open that MPQ with a program like WinMPQ or Ladik's MPQ Editor and extract aiscript.bin.

Create a new folder, let's say for example C:\mod and another folder inside it named 'scripts' and place aiscript.bin there (So C:\mod\scripts\aiscript.bin)

Open command line, run
Code
C:\path\to\samase.exe C:\mod --pack C:\mod\BWMetaAI.exe

(Obviously use whatever path you had samase downloaded to)

Now you should have BWMetaAI.exe in C:\mod which should launch the mod.

---

If your antivirus has an issue with newly created exes you can also just launch BW directly with
Code
C:\path\to\samase.exe C:\mod

but then you probably want to save the command in a .bat file/shortcut with arguments instead of typing that every time.



None.

Feb 4 2020, 9:42 am victorsena13 Post #119



Many Thx, i've tried and got these errors lauching the .EXE "---------------------------
Samase panic
---------------------------
Panic at src\lib.rs:741
Could not load patch archives: Archive error: No embedded file
Backtrace:
0x33dc69d "samase_0628_P0n3WxN0.dll" 0x3320000 -- rust_eh_personality
0x77e26d02 "ntdll.dll" 0x77da0000 -- LdrCallEnclave

---------------------------
OK
---------------------------
"
and

"---------------------------
StarCraft Remastered mod
---------------------------
Launch: Injection error: Error while reading child process's pipe: O pipe foi finalizado. (os error 109)
---------------------------
OK
---------------------------
"

Post has been edited 1 time(s), last time on Feb 4 2020, 9:47 am by victorsena13.



None.

Feb 15 2020, 10:56 am Neiv Post #120



Updated for the latest patch.

Quote from victorsena13
Many Thx, i've tried and got these errors lauching the .EXE

...

Seems that the program fails to properly create the exe. Maybe some antivirus is blocking it? You may want to try running the same command again to see if anything changes, or just using the command without --pack to launch directly. If there are no errors on command line when creating the exe I'm not sure if its anything I can fix.



None.

Options
Pages: < 1 4 5 6 7 >
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[08:28 pm]
NudeRaider -- :wob:
[07:50 pm]
Ultraviolet -- :wob:
[06:09 pm]
UndeadStar -- :wob:
[02:53 pm]
Nekron -- :wob:
[02:13 pm]
lil-Inferno -- :wob:
[06:23 am]
Ultraviolet -- :wob:
[10:26 pm]
O)FaRTy1billion[MM] -- :wob:
[2020-7-01. : 5:11 pm]
MTiger156 -- :wob: athon
[2020-7-01. : 3:06 pm]
NudeRaider -- :wob:amatic
[2020-7-01. : 1:37 pm]
jjf28 -- :wob: de :wob:
Please log in to shout.


Members Online: Roy, MTiger156, Ultraviolet