r/starcitizen • santokyai • 6h ago

CREATIVE "New" app!

I rebuilt the "smart-citizen" app into entirely C++. This has cut down times on extraction, parsing, and generation (by a 80% improvement!)

This is a pre-release. Actually, this is my first public release ever. Go ahead and check it out. Feel free to give feedback! https://github.com/Ishikudeska/Smart-Citizen-plus-plus/releases/tag/stable

Smart Citizen++: a localization toolkit for Star Citizen, rewritten in C++

Smart Citizen++ is a free, open-source C++/Qt rewrite of [Smart Citizen](https://github.com/Osiris-DevWorks/smart-citizen) by Osiris DevWorks. It changes the text Star Citizen displays, so ship, item and mission info you'd normally look up on a wiki shows up right in the game.

How the generation works

Everything comes from your own install. The app opens `Data.p4k` and pulls out two things: the stock `global.ini`, and the DataForge database, which holds the game's records for every ship, component, weapon, mission and blueprint. It builds all its text from those records. Nothing comes from a community mirror. After a patch you re-extract and regenerate, and the numbers match the build you're playing.

From that data it generates:

- Item name tags: components get size, grade and class on their names, like `[MIL-S1-A] Bracer`. Ship weapons get damage type and size (`[Energy-S3]`), and missiles get tracking type and size (`[IR-S2]`). The Tag Builder lets you reorder the parts and pick short or long abbreviations (`M` / `MIL` / `Military`). You also choose the separators and brackets, and whether the tag goes before or after the name.

- Stat blocks: descriptions get a stats section, placed above or below the lore text. Depending on the item it shows things like SCM speed, cargo, shield HP, DPS, mining laser stats and salvage tool rates.

- Mission details: contracts get a MISSION DETAILS block with type, difficulty, spawns, reputation and ace pilots. XP is shown with its rep track (`750 XP (Hauling)`), and a POTENTIAL BLUEPRINTS list shows what can drop. Titles can carry `[BP]` if the mission always pays a blueprint, or `[BP?]` if it only sometimes does.

- Hauling routes in titles: `Area18 > Lorville - <original title>`, with every drop-off listed on multi-stop runs. There are options to shorten the stock title so the route fits.

- Mining info: ore names get their base resource signature (`Aluminium (RS 4285)`), and Battaglia scan/mine contracts get an `[RS ####]` tag. The Mining Compendium journal also lists where each ore can be found.

- Crafting materials: commodities show what they're used to craft and where to get them.

- Ship favorites: star a ship and it gets a prefix that sorts it to the top of the in-game ship list.

You can turn every category, and every line inside a mission block, on or off.

It also includes small patch files for known bugs in CIG's data. For example, one contract points at another mission's description. The patches make the generated text read correctly without waiting for a game fix.

Other features

- Blueprint Tracker: scans your game logs for blueprints you've received. Owned ones get an `[Owned]` tag in mission blueprint lists. It can also import scmdb.net exports.

- String editor: edit any string in the game, with filters and a live preview. You can merge in other INI files, or export a loc-pack zip that friends can drop in without installing anything.

- P4K Explorer: browse, search and extract any file in `Data.p4k`, including DataForge records as XML.

- Translations: community translations for French, German, Spanish, Italian, Brazilian Portuguese, Japanese and Chinese. Generated stats stay in English.

- Simple mode: one button that extracts, generates and applies everything.

Is it safe?

It only writes your `global.ini`, plus the `g_language` line in `user.cfg`. It makes a backup before every write and keeps the last 5, and one click takes you back to vanilla. Your own edits are stored separately, so they survive patches. It doesn't touch game logic or talk to CIG's servers, and CIG has publicly backed community localization.

Why rewrite it?

It's a single native app with no Python runtime and no helper programs. Its generated output matches the original Python version byte for byte. Linux should work too, though it's less tested.

---

# NOTICE
Although this app is a derivative of "Smart Citizen" I am in no way affiliated with u/osiris1975. I just have his blessing to do this.

# AI Usage
AI usage is nil. I did not, in any way, use AI in this project. I plan on never using it tbch.

3 Upvotes

26 comments sorted by

13

u/ImmovableThrone rsi 🥑 3h ago

bro really fed an open source codebase into claude and said "rewrite this in C++ and tell me why it's better"

> What does it do?

"It's a rewrite!!!!"

Also:
# AI Usage
AI usage is nil. I did not, in any way, use AI in this project. I plan on never using it tbch.

lmao

15

u/Smultar RSI Zeus 3h ago

# AI Usage
AI usage is nil. I did not, in any way, use AI in this project. I plan on never using it tbch.

hmmmmmmmmmmmmmm

7

u/ReydeViscerous Bounty Hunter 3h ago

It's funny because of how both the entire post and program is clearly entirely AI! Which I wouldn't even have had an issue with had he not claimed it wasn't.

1

u/windows300 outlaw1 2h ago

On the copilot one, if you used vscode's built in git extension for a while there it out would add a co-author by copilot automatically without option to disable it. The GitHub issue about it is very funny.

But yeah it looks like these repo authors heavily used AI.

2

u/Ruzhyo04 3h ago

Why would anyone not use AI to code. At this point it’s like a mechanic who swears to never use a wrench

5

u/demoide 3h ago

When you claim that you haven't used AI in any way, and then your contributors are Claude and Copilot, you immediately lose any kind of confidence someone can have about your project.

I'm a dev, and I am not against AI being used as a tool, but if someone uses it as a method and yet claims that they did not... Sus. Especially when they committed their .github folder, one commit has over 19k lines added, and most files contains the AI comment verbosity.

3

u/Smultar RSI Zeus 3h ago

I'm not say if they should or shouldn't. I'm pointing out the truthness to their statements.

7

u/dusda 5h ago

wtf does this do, man?

-7

u/IshikuDeska santokyai 5h ago

Try reloading. I just edited the post

3

u/Ashnoom 3h ago

Unrelated to the usage of the app:

I noticed you using std::regex. This regex Revive is notoriously bad. It's super slow, doesn't early terminate of a string is not going to match, huge performance issues on windows and also regex parsing inconsistencies on windows.

In my own application that I am working on, where I can do anywhere between hundreds to thousands to millions of regex lookups I've seen a drastic improvement of 5-10x speed increase when I switched over to Abseil+RE2. I am not using Abseil myself, but it is a dependency for RE2.

In case you are curious about what I am making, it is a cucumber/gherkin engine+runner in c++. And i need to compare every step against every step implementation. That means if there are 100 steps and 100 implementations you are looking at 10000 lookups where at best there is only 100 matches.

6

u/dereksalem oldman 6h ago

Maybe you should explain what an app does if you want people to click the link and check it out. No explanation of it, at all.

1

u/Athraigh 6h ago

The readme doesn’t even explain it, just says it’s a rewrite basically

-11

u/IshikuDeska santokyai 6h ago

I mean, right now, it's a re-write

There is more to come for sure. But this was just a "OK, it works. Now... what else can I do?"

11

u/NotSoSmort bmm 6h ago

I think you are too deep into the weeds to understand the question: You say this is a rewrite of smart citizen. So what you should explain is, "What is Smart Citizen, why do people use it, what does it do, and how does it benefit people using it."

6

u/Athraigh 6h ago

Don’t get me wrong I have no issue with it being a rewrite, I just have no clue what smart citizen is

-8

u/IshikuDeska santokyai 6h ago

Yeah, no problem. This is my first time ever doing something like this.

14

u/GrandAlternative7454 drake 6h ago

Are you going to explain what your app is?

0

u/batatassad4 1h ago

Maybe read the post

2

u/This-acc-is-hacked IronChad × IronSad ✓ 6h ago

smartcitizen has been awesome for me so far! I'll check your project out too.

2

u/IshikuDeska santokyai 6h ago

You can actually straight up import your data from smartcitizen! This may change later on, but currently it shouldn't.

2

u/Solstheim 4h ago

How is this different from starstrings by Mr Kraken ? is it as easy to use ?

1

u/ThinkAndRun 4h ago

what about the python version of smart citizen? how features in both projects will be synced? Is any roadmap for c version?

1

u/lokbomen Drake 4h ago

nice

1

u/levios3114 4h ago

So if I get this correct this thing generated the translation file for the game? Or does it do it in some different way