Comments (1)
I have a somewhat usable tool cs2_decompile.exe
to extract FES (Front End Script) files into a text format. It can be obtained from the Decompile Tool link below, in my research repository.
Links
- Decompile Tool (direct dl | permalink) , file:
cs2_decompile.exe
- Compile Tool (official | direct dl | web archive) , path:
/cs2_full_v401/system/fes/fes.exe
- FES Documentation (Japanese), use a Browser that auto-translates (unless your Japanese is good)
Decompile
As an example to decompile a single script meswnd.fes
in the command line:
C:\>cs2_decompile meswnd.fes
:: CatSystem2 Script Decompiler
:: FES meswnd.fes -> meswnd.txt (shift-jis)
By default, FES scripts are extracted in their original Shift_JIS text encoding, and it's recommended to keep it that way while modifying.
Modify
Once decompiled, you'll get a file that looks something like this. And they can be pretty massive >.>
Like this
// [...]
#MACRO
PX 0
PY 420
VY 720
// [...]
#SYSVOICE
if ($814>=900)
if ($814==900) se2 load se900
if ($814==901) se2 load se901
if ($814==902) se2 load se902
if ($814==903) se2 load se903
se2 play 1 0
break
endif
if ($781==0)
// [...]
#OBJECT FILE ID.0 ID.1 ID.2 ID.3 ID.4 ID.5 DISP PL PRI
img_autospd $str900 700 701 702 703 704 705 0 pl_base 410
#OBJECT FILE IDN
img_font userfont -1
#START
deletebgbutton
getconf 1026 messpd
\110 = $1026
call STRLAYOUT
call NAMELAYOUT
call WNDALPHA
\200 = 1
\201 = 1
\202 = 1
\203 = 1
// [...]
The documentation pages linked above should help a bit, but hopefully whatever you need to accomplish isn't too difficult, I haven't done nearly enough research into working with FES scripts. :(
Note: If you find the following in your decompiled FES script: STRING8
, LOGSTRING8
, NVSTRING8
. Then you may run into extra hurdles when de/recompiling the script. I never figured out exactly how CS2 does it, but some FES scripts may contain both Shift_JIS text and UTF-8 text. (but don't bother worrying about that unless you're actually experiencing issues)
Recompile
Once you're done modifications, you can recompile it using the official CS2 devkit tool fes.exe
, linked above. If you run into errors or unexpected behavior while compiling, you might need to emulate the Japanese Locale in a command prompt when running the Tool.
C:\>fes meswnd.txt
:: <japanese>(fes)<japanese> fes.exe
:: convert to fes -> C:\meswnd3.txt ... done
from triggerstools.catsystem2.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from triggerstools.catsystem2.