Author Topic: questions about Piratez.rul  (Read 1241 times)

Offline ziroc

  • Sergeant
  • **
  • Posts: 10
    • View Profile
questions about Piratez.rul
« on: April 15, 2019, 05:21:12 pm »
Before the question I have to say, I'm new to the game and it's awesome :)

So, I'm trying to create something like a wiki for the Bootypedia. Actually it is a parser for Piratez.rul and en-US.rul + a web front-end. But I'm having some troubles with connecting the items in both files.

After some research I found out that most of the keys in the Piratez.rul look like STR_BASIC_ELECTRONICS.  And you can add _UFOPEDIA to them. With the resulting STR_BASIC_ELECTRONICS_UFOPEDIA you can look up in the en-US.rul to find the description of the technology.

But it turns out it is not so simple.
Some of the items you have to add _AC_UFOPEDIA to get the correct key.
And some items like STR_TINY_DRILL_INVESTIGATION have key like STR_TINY_DRILL_UFOPEDIA. So I cannot derive the key from the item name.

So my first question is, is there some algorithm I can use to always get the correct key from the language file for every item in Piratez.rul?

Thanks :)


Offline ziroc

  • Sergeant
  • **
  • Posts: 10
    • View Profile
Re: questions about Piratez.rul
« Reply #2 on: April 15, 2019, 10:03:51 pm »
Perfect. I haven't read C++ in 15 years, but I think I found what I need. Thanks Meridian!

Offline ziroc

  • Sergeant
  • **
  • Posts: 10
    • View Profile
Re: questions about Piratez.rul
« Reply #3 on: April 16, 2019, 12:25:26 am »
Alright. I have a prototype to show :)

https://xpz-wiki.herokuapp.com/

The hosting is free and they sleep the app after some time, so the first page load time could be half a minute.
« Last Edit: April 16, 2019, 12:35:09 am by ziroc »

Offline ziroc

  • Sergeant
  • **
  • Posts: 10
    • View Profile
Re: questions about Piratez.rul
« Reply #4 on: April 16, 2019, 12:20:34 pm »
What is the purpose of the techs that have 0 cost? For example:

Code: [Select]
- name: STR_HELMET
    cost: 0
    points: 10
    dependencies:
      - STR_SECTOID_EXPLORER
      - STR_ACADEMY_SCIENTIST
      - STR_GUILD_EXTERMINATOR
      - STR_GOVT_ELITE
      - STR_NAZI_STORMTROOPER
      - STR_BANDIT_GHOUL
      - STR_BANDIT_GHOUL_SCI

Do you get it for free?
I also cannot find link to Bootypedia article about it.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 5185
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: questions about Piratez.rul
« Reply #5 on: April 16, 2019, 01:05:48 pm »
What is the purpose of the techs that have 0 cost?

Many different things.

Use the in-game TechTreeViewer to see the connections and guess... or ask the mod author.

Offline Ashghan

  • Colonel
  • ****
  • Posts: 100
    • View Profile
Re: questions about Piratez.rul
« Reply #6 on: April 16, 2019, 04:35:29 pm »
While I applaud the idea, the execution might be very difficult. Xpiratez was not written in a way that would play nice with what you want to do - you'll get many inconsistent results and some which are blatantly wrong. I opened the page and from the 5 random articles, 1 was wrong and 2 were incomplete (to the point of being useless).
https://xpz-wiki.herokuapp.com/item?id=STR_CONTACT_MAGIC_SHOP_ZZZ - it gives the description of the Heartgrip Staff - it's a dependency project, without it's own Bootypedia article. IIRC HG Staff is only one of the unlocks after researching it.
https://xpz-wiki.herokuapp.com/item?id=STR_LOADER_ARMOR - loader suit shows that the text string (the description) is not enough - we'd need armor values and stat modifiers for the page to be meaningful. Plus Loader Suit unlocks multiple different armors at once (land, sea and space version - each of these for Gals, Peasants and Slaves separately - 9 variants total).
https://xpz-wiki.herokuapp.com/item?id=STR_LARGE_RADAR_SYSTEM - no errors, but still not enough info - cost, build time etc.
https://xpz-wiki.herokuapp.com/item?id=STR_RUSSIAN_FILES - OK, it's a lore article (and an unlock) anyway.
https://xpz-wiki.herokuapp.com/item?id=STR_CYBERDISC_TERRORIST - As above.

Correcting everything by hand would be too much to even consider it. A difficult, but perhaps more consistent approach would be to make the script look through each section of Piratez.rul separately and add Cost, build time, tech required, etc. based on the entries. How to handle other stats (prison capacity, defense ratio, storage space etc.) is another problem. Multiply these problems for each of the sections (facilities, craft, equipment, soldiers, armors and so on).
Basically - you'd have to re-write the code that generates in-game Bootypedia into something that works web-based, while still retaining 100% functionality. Good luck, you're going to need it.


Offline ziroc

  • Sergeant
  • **
  • Posts: 10
    • View Profile
Re: questions about Piratez.rul
« Reply #7 on: April 16, 2019, 06:10:10 pm »
Ashghan, you are right, its not easy.

My initial goal was getting the research tree and its dependencies. So I can search for a tech and check what I need to obtain it. On this goal, I think I'm half way there :)

For the future and in order to be more useful, the wiki must have the connection between technologies and their corresponding items, weapons, armors, buildings, etc. Which as you said could be hard. But we'll see, I'm optimistic :)

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 5185
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: questions about Piratez.rul
« Reply #8 on: April 16, 2019, 06:15:44 pm »
My initial goal was getting the research tree and its dependencies. So I can search for a tech and check what I need to obtain it. On this goal, I think I'm half way there :)

Maybe you don't know, but such tech tree with search and all dependency links is already available directly in-game.

Offline ziroc

  • Sergeant
  • **
  • Posts: 10
    • View Profile
Re: questions about Piratez.rul
« Reply #9 on: April 16, 2019, 07:38:44 pm »
Maybe you don't know, but such tech tree with search and all dependency links is already available directly in-game.
I think I have saw it. But I can't play the game in the bus. Or at work. Sad.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 5185
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: questions about Piratez.rul
« Reply #10 on: April 16, 2019, 07:41:24 pm »
But I can't play the game in the bus.

There is a version for Android and for iOS too.

Or at work.

Nobody can.

Offline LytaRyta

  • Colonel
  • ****
  • Posts: 246
  • Lisbeth ;p
    • View Profile
    • svetmightandmagic.cz
Re: questions about Piratez.rul
« Reply #11 on: April 16, 2019, 07:54:55 pm »
..excellent!

yap, parsing, = automatization (of some coding, programming, code, (datas) processing... etc.. (if i get it, understand it right )), - but wouldn´t it better make just all just "by hand", "manually ?   every article, every "technology", page after page, tech after tech, ~~ and make from all of it whole new UFO-pedia (xPiratez Wiki)  8)
« Last Edit: April 18, 2019, 10:28:37 pm by LytaRyta »

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 5185
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: questions about Piratez.rul
« Reply #12 on: April 16, 2019, 07:59:49 pm »
yap, parsing, automatization (if i get it, understand it right), - but wouldn´t it better make just all just "by hand", "manually ?   every article, every "technology", page after page, tech after tech, ~~ and make from all of it whole new UFO-pedia (xPiratez Wiki)  8)

Yes, please do it.

Offline ziroc

  • Sergeant
  • **
  • Posts: 10
    • View Profile
Re: questions about Piratez.rul
« Reply #13 on: April 16, 2019, 08:22:47 pm »
@LytaRyta Not sure if serious. There are like 3 thousand items in the Bootypedia :)

@Meridian  I guess you feel I'm duplicating the work done for the in-game Ufo-pedia. That is true, but in my defense - creating small utilities for the games I play is my hobby.
For example I have a thingie that auto-accepts my Dota2 games. I have a utility for Dwarf Fortress that shows the skills of the dwarves (similar to Dwarf Therapist, which wasnt working at the time). Things like this. Its just my thing.

Offline legionof1

  • Commander
  • *****
  • Posts: 1421
  • Bullets go that way. Money comes this way.
    • View Profile
Re: questions about Piratez.rul
« Reply #14 on: April 17, 2019, 03:22:32 am »
Well for my part, i hope this turns out well, external references are nice/handy when possible.