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

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.

Options
Pages: < 1 4 5 6
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[11:34 pm]
Wing Zero -- Ya'll ever forget your birthday? Cause I just did.
[10:00 pm]
GGmano -- My colour pink ehhh
[09:27 pm]
NudeRaider -- man I hate combo breakers
[09:21 pm]
RdeRenato -- I want to play doom eternal :c
[09:10 pm]
MTiger156 -- New DBZ game is pretty dank. I almost feel like reviving my bad attempt at DBZ All Sagas Remastered.
[08:09 pm]
Vrael -- :yahoo: is acceptable but it should be followed up with a :wob:
[07:41 pm]
Doodan -- :yahoo:
[07:06 pm]
NudeRaider -- :wob:
[05:34 pm]
lil-Inferno -- :wob:
[04:42 pm]
jjf28 -- :wob:
Please log in to shout.


Members Online: Roy, Dem0n, torpeda1811448926, jjf28, nowicjusz129158, Wing Zero