1
XPiratez / Sharing a few toys
« on: April 14, 2017, 02:46:44 am »
Per request, sharing some of the tools I wrote. These are pretty basic stuff.
You need some way to compile the C++ code and run the resulting executable. And this is all command line, I don't do GUI![Smiley :)](https://openxcom.org/forum/Smileys/default/smiley.gif)
I personally use cygwin64 terminal with GNU C++ and Netbeans IDE for editing.
In all the programs, main function has two strings: saveDir and ruleDir that should point to save and ruleset directories, respectively.
By default, game.sav save file is used.
Research analyzer (rsrch.cpp)
Providing a target research topic: right now, one has to type in an exact codename, such as STR_SCHOOLING_2
In the plans it to allow typing in translated name and do pattern search, but for the time being I just grep Piratez_lang![Smiley :)](https://openxcom.org/forum/Smileys/default/smiley.gif)
Providing a research topic without options tells you what you need for it.
Options prepending the topic:
-g tells you what the topic is immediately needed for, as well as its list of 'give free'
-t lists all the research that needs the topic.
Working also with topic:
-k lists requirements or dependents you already know. By default they are skipped
-u shows Bootypedia entry for the topic
Other options
-s [savename] - use alternate save file (without .sav extension)
-c cost analisys. Shows cost distribution of projects not yet researched. Providing a number, i.e. 20 will list topics with that cost.
-f lists research that has facility requirements
-a lists topics available to research or being researched.
-p lists currently being researched topics
-n (works with -a) also lists topics that you could research if you had the requisite item (can be quite long)
Example:
rsrch -u -g STR_MAGICAL_GIRL -s Daily
Output:
Magical Girl / STR_MAGICAL_GIRL (7) [ ITEM MISSING ]
UNLOCKS:
NEEDED FOR :
AUX_LUCKY_STAR / AUX_LUCKY_STAR (10)
+1 others
GIVES FREE :
Magical Cake / STR_CAKE (5) [ ITEM MISSING ]
Soul Gem / STR_MAGICAL_GIRL_CORPSE (10) [ ITEM MISSING ]
Mercenary Shock Trooper / STR_MUTON_HEAVY (15) [ ITEM MISSING ]
Mercenary Commando / STR_MUTON_NAVIGATOR (15)
Mercenary Soldier / STR_MUTON_SOLDIER (10)
Smuggler Captain / STR_SMUGGLER_CAPTAIN (15) [ ITEM MISSING ]
Wand of Peace / STR_WAND_HARTO (10) [ ITEM MISSING ]
These barely-adult girls have exactly that kind of immoral innocence about them that makes most males weak-kneed. They're also aggressively nice, playful and adaptive (see how she dresses after a few days here). What's perplexing though, they have no recollection of their identity or origin, or even the Well-wisher (whom they call the Goddess of Love, or of Cake), other than they found themselves aboard the ship with a deeply engraved mission of 'spreading love'. They also possess bits and pieces of strange knowledge and/or previous encounters.
Example:
rsrch -u STR_GRAVITY_PHYSICS -s Daily
Output:
Gravity Physics / STR_GRAVITY_PHYSICS (60)
DEPENDS ON :
{
Implosion Bomb Launcher / STR_BOMB_LAUNCHER (0)
UNLOCKED BY :
{
Implosion Bomb Lnchr. Parts / STR_BOMB_LAUNCHER_PARTS (35) [ ITEM MISSING ]
}
/Implosion Bomb Launcher
}
/Gravity Physics
The Stellar Empire has mastered the use of antigravity, as can be witnessed in the easiness of use of the Grav Harness and antigrav vehicles. The body of knowledge we have secured will let us optimize our own antigravitic technologies.
You need some way to compile the C++ code and run the resulting executable. And this is all command line, I don't do GUI
![Smiley :)](https://openxcom.org/forum/Smileys/default/smiley.gif)
I personally use cygwin64 terminal with GNU C++ and Netbeans IDE for editing.
In all the programs, main function has two strings: saveDir and ruleDir that should point to save and ruleset directories, respectively.
By default, game.sav save file is used.
Research analyzer (rsrch.cpp)
Providing a target research topic: right now, one has to type in an exact codename, such as STR_SCHOOLING_2
In the plans it to allow typing in translated name and do pattern search, but for the time being I just grep Piratez_lang
![Smiley :)](https://openxcom.org/forum/Smileys/default/smiley.gif)
Providing a research topic without options tells you what you need for it.
Options prepending the topic:
-g tells you what the topic is immediately needed for, as well as its list of 'give free'
-t lists all the research that needs the topic.
Working also with topic:
-k lists requirements or dependents you already know. By default they are skipped
-u shows Bootypedia entry for the topic
Other options
-s [savename] - use alternate save file (without .sav extension)
-c cost analisys. Shows cost distribution of projects not yet researched. Providing a number, i.e. 20 will list topics with that cost.
-f lists research that has facility requirements
-a lists topics available to research or being researched.
-p lists currently being researched topics
-n (works with -a) also lists topics that you could research if you had the requisite item (can be quite long)
Example:
rsrch -u -g STR_MAGICAL_GIRL -s Daily
Output:
Magical Girl / STR_MAGICAL_GIRL (7) [ ITEM MISSING ]
UNLOCKS:
NEEDED FOR :
AUX_LUCKY_STAR / AUX_LUCKY_STAR (10)
+1 others
GIVES FREE :
Magical Cake / STR_CAKE (5) [ ITEM MISSING ]
Soul Gem / STR_MAGICAL_GIRL_CORPSE (10) [ ITEM MISSING ]
Mercenary Shock Trooper / STR_MUTON_HEAVY (15) [ ITEM MISSING ]
Mercenary Commando / STR_MUTON_NAVIGATOR (15)
Mercenary Soldier / STR_MUTON_SOLDIER (10)
Smuggler Captain / STR_SMUGGLER_CAPTAIN (15) [ ITEM MISSING ]
Wand of Peace / STR_WAND_HARTO (10) [ ITEM MISSING ]
These barely-adult girls have exactly that kind of immoral innocence about them that makes most males weak-kneed. They're also aggressively nice, playful and adaptive (see how she dresses after a few days here). What's perplexing though, they have no recollection of their identity or origin, or even the Well-wisher (whom they call the Goddess of Love, or of Cake), other than they found themselves aboard the ship with a deeply engraved mission of 'spreading love'. They also possess bits and pieces of strange knowledge and/or previous encounters.
Example:
rsrch -u STR_GRAVITY_PHYSICS -s Daily
Output:
Gravity Physics / STR_GRAVITY_PHYSICS (60)
DEPENDS ON :
{
Implosion Bomb Launcher / STR_BOMB_LAUNCHER (0)
UNLOCKED BY :
{
Implosion Bomb Lnchr. Parts / STR_BOMB_LAUNCHER_PARTS (35) [ ITEM MISSING ]
}
/Implosion Bomb Launcher
}
/Gravity Physics
The Stellar Empire has mastered the use of antigravity, as can be witnessed in the easiness of use of the Grav Harness and antigrav vehicles. The body of knowledge we have secured will let us optimize our own antigravitic technologies.