Automatically importing in-game items/ship/etc into the wiki

General discussion about anything related to Transcendence.
User avatar
pixelfck
Militia Captain
Militia Captain
Posts: 571
Joined: Tue Aug 11, 2009 8:47 pm
Location: Travelling around in Europe

Hi,

Yesterday on the IRC chat, there was a question about automatically generating/updating wiki content based upon the .tdb files.

I think I could fairly easily create a (php) script which would parse the XML and spit out a result in some sort of predefined format.

However, before I start writing such a script, I would like to know:
  • Which type(s) need to be parsed (<ItemType />, <StationType />, <ShipClass />)?
  • Which tags and/or attributes of these types needs to be exported to the wiki (for <ItemType />, this would differ from type to type: shields != weapons)?
  • What format should the output be? should it be HTML, wiki-syntax or something else*?
* It would help a lot if somebody could come up with templates/example output which need to be filled in with data from the XML types.

Also, let's not get overly enthusiastic and come up with a requirements list which includes each and every type in Transcendence. Instead, let's start with the highest priority types first: the bigger this idea grows, the less chance I have time to complete it as something reasonably user-friendly.

Let's work out this idea in this topic and see if we can create something constructive.

Cheers,
Pixelfck
Image
Download the Black Market Expansion from Xelerus.de today!
My other mods at xelerus.de
User avatar
Sai
Anarchist
Anarchist
Posts: 24
Joined: Sat Apr 25, 2015 6:38 pm
Location: Croatia

THANK YOU, PIXELFCK!

Actually, During the IRC day, we asked George if he could create something like that, but since he's busy with everything else, we're basically stuck with TransData, so hearing this is a major relief and will certainly help speed things up.

Currently Ttech and I will be working on the new wiki, which will use the mediawiki syntax, I believe...
He's the one setting up the test wiki, so you should ask him about the details.

As for type, tag and attribute parsing/exporting, I'll set up a list of those and post it here.
I could even create a simple illustration on how the table template should look like, if that would help.
Everything is theoretically impossible, until it is done.
User avatar
AssumedPseudonym
Fleet Officer
Fleet Officer
Posts: 1190
Joined: Thu Aug 29, 2013 5:18 am
Location: On the other side of the screen.

 I have a couple of utility mods that generate tables of information on ships and weapons. The released versions on Xelerus output as a spaced text table in Debug.log, but if you give me the formatting you want them to have, it wouldn’t be hard for me to write up a version to output to that formatting instead. I could also do the same for armor and shields with little difficulty.
Image

Mod prefixes: 0xA010 (registered) and 0xDCC8 (miscellaneous)

My mods on Xelerus: Click here!

Of all the things I’ve lost in life, I miss my mind the least. (I’m having a lot more fun without it!)
User avatar
pixelfck
Militia Captain
Militia Captain
Posts: 571
Joined: Tue Aug 11, 2009 8:47 pm
Location: Travelling around in Europe

Sai wrote:Currently Ttech and I will be working on the new wiki, which will use the mediawiki syntax, I believe...
He's the one setting up the test wiki, so you should ask him about the details.

As for type, tag and attribute parsing/exporting, I'll set up a list of those and post it here.
I could even create a simple illustration on how the table template should look like, if that would help.
That's great to hear. I'm more familiar with mediawiki's wiki syntax, so it would be easier for me to make changes then :-)

It would certainly be very helpful if you could come up with some illustration on what you would like the result to look like (because I can than simply focus on parsing the data and filling in the blanks).

Cheers,
Pixelfck
Image
Download the Black Market Expansion from Xelerus.de today!
My other mods at xelerus.de
JohnBWatson
Fleet Officer
Fleet Officer
Posts: 1452
Joined: Tue Aug 19, 2014 10:17 pm

Images are what I'd be most interested in figuring out.

Do we want the entire spritesheet, or just the downward facing?

That aside, I think the current wiki template would be a good start. Flavor text at the bottom, all other relevant stats above. I'd personally like to see range calculated and displayed for relevant ammo and weapons.

Weapons and ammo could be sorted by level, and ships could be sorted by manufacturer.
User avatar
pixelfck
Militia Captain
Militia Captain
Posts: 571
Joined: Tue Aug 11, 2009 8:47 pm
Location: Travelling around in Europe

images are not really a problem: I can automatically crop sprites and apply the grayscale masking without too much effort.

~Pixelfck
Image
Download the Black Market Expansion from Xelerus.de today!
My other mods at xelerus.de
User avatar
Sai
Anarchist
Anarchist
Posts: 24
Joined: Sat Apr 25, 2015 6:38 pm
Location: Croatia

Looks like some of the dll-s on my laptop got corrupted and somehow I lost a few admin privileges so I can't run half of my programs, including all of my photo and graphic design software. The only thing working right now for me is Paint! Moving on...

I do have a basic idea on what info should be the most relevant to display, so here's an example regarding armor, weapons and ships.
Attributes in brackets are either optional or can be used as trivial information.

Armor

Name - Name of the armor.
Level - Current level in game.
(Type - Heavy, Light, Stealth, Solar, see: Special Properties).

Rarity - We could create a more immersive rating system,
for example C+ (For items classified Common [C] that can be found less often [+] in their class),
or perhaps R- (For items classified Rare [R] that can be found more often [-] than others in their class),
or even U (For items classified Uncommon that are not yet rated or the amount varies).

Hitpoints - Number of hitpoints.
(We could also mention here the max number of hitpoints after enhancements and the lowest number of hitpoints before it becomes unrepairable.)
Value - Base value displayed in credits and/or rin.
Mass - Mass of one armor segment in tonnes.

Immunity - List of damage types that the armor is immune to (eg. EMP, Radiation, Laser, None if no immunities).
Resistance - List of damage types that the armor is more or less resistant to and their respective percentage modifiers.
Special Properties - List of special properties like Shield Disrupt, Self-repairing, Reactor Recharge, etc.

Produced by - Factions, Companies or Stations that mostly or exclusively sell that type of armor.
Used by - Factions or Companies that mostly or exclusively use this type of armor for their stations and/or ships.

(Repaired by - List of items or devices that can be used to repair with).
(Special Coatings - List of damage resistant and other coatings that can be applied).


+In-game description of the armor.

Weapon

Name
Level
Rarity

Mass
Value

Damage - Number of hitpoints followed by type of damage that the weapon inflicts.
(Plus a multiplier if several projectiles are fired at the same time).
Fire rate - Frequency at which a specific weapon can fire or launch its projectiles.
Ammo - Type of ammo which it uses if any at all.

Special Properties - List of special properties like Omnidirectional, Overheating, EMP or Radiation inflicting, etc.

Used by
Produced by

Ship

Name - Full name of the ship
Type/Class - Fighter, Freighter, (Scavenger?), etc.
Wreckage chance - Percentage of times it leaves a wreckage after destroyed.

Equipped weapons
Equipped shields
Equipped armor + number of armor segments.

Speed (Cruising/Max)
(Turning speed)

Used by
Produced by
The rest like weight, length, carrying capacity isn't really necessary unless it's a playership, but can be added.


Feel free to tell which of these can be parsed/extracted and if I missed something.
Everything is theoretically impossible, until it is done.
User avatar
Sai
Anarchist
Anarchist
Posts: 24
Joined: Sat Apr 25, 2015 6:38 pm
Location: Croatia

JohnBWatson wrote:Images are what I'd be most interested in figuring out.
There would be no problem in using updated weapon images from CC/EP, right?
And is there a possibility to extract images from other files inside Trans.tdb?
(Since it looks like not all of them got decompiled, at least for me).
JohnBWatson wrote:Do we want the entire spritesheet, or just the downward facing?
Can spritesheets be animated? I think that's a thing. If so, we could use that.
JohnBWatson wrote:That aside, I think the current wiki template would be a good start. Flavor text at the bottom, all other relevant stats above. I'd personally like to see range calculated and displayed for relevant ammo and weapons.
The current wiki template is okay, but I do have an idea for a more compact one. I'll show you what I mean soon enough.
Can someone tell me what's the pixels per light second conversion, then?
Also, I'd like volunteers to record and take notes of anything that they find interesting and noteworthy during their gameplays.
Pretty please...
JohnBWatson wrote:Weapons and ammo could be sorted by level, and ships could be sorted by manufacturer.
I was thinking about creating a huge table database that would be able to, for example, list and sort all ships by their name, type, speed, weapons, armor and shields they use and so on. That would be way more practical.

Especially for armor and weapons where you could list them by particular resistance type, immunity, level, price and some sort of Value Index all in one table which would make comparing them so much easier!
Everything is theoretically impossible, until it is done.
User avatar
pixelfck
Militia Captain
Militia Captain
Posts: 571
Joined: Tue Aug 11, 2009 8:47 pm
Location: Travelling around in Europe

Sai wrote:Can spritesheets be animated? I think that's a thing. If so, we could use that.
It may be possible, but I'm not sure. For version 1.0 lets just stick to a single static frame.
Sai wrote:Can someone tell me what's the pixels per light second conversion, then?
1 pixel equals 12,500 km of in universe distance.
The speed of light is 299,792.458 km/s (in a vacuum).
so, 1 pixel equals ~0.0417 light second and 1 light second equals exactly 23.98339664 pixels.


Was this what you were looking for?

~Pixelfck
Image
Download the Black Market Expansion from Xelerus.de today!
My other mods at xelerus.de
User avatar
Sai
Anarchist
Anarchist
Posts: 24
Joined: Sat Apr 25, 2015 6:38 pm
Location: Croatia

Yes, thanks. Perhaps I'll be doing some game recording just to get an approximate range on some weapons...
Now that I think about it, do you perhaps know the minimap scale? For those long range projectiles, of course.

Is there even an easier way to do this?
Everything is theoretically impossible, until it is done.
User avatar
AssumedPseudonym
Fleet Officer
Fleet Officer
Posts: 1190
Joined: Thu Aug 29, 2013 5:18 am
Location: On the other side of the screen.

 Weapon range can be extrapolated from speed and lifetime of the projectile. I don’t remember the exact formula off the top of my head, but it’s not a complicated one and I’d take the time to figure it out for you if I wasn’t about to take my wife to the dentist. The basic laser weapons have a range of 60 ls — you can use that as a starting point for poking at numbers.

EDIT: Try (lifetime*2)/speed I think.
Image

Mod prefixes: 0xA010 (registered) and 0xDCC8 (miscellaneous)

My mods on Xelerus: Click here!

Of all the things I’ve lost in life, I miss my mind the least. (I’m having a lot more fun without it!)
User avatar
pixelfck
Militia Captain
Militia Captain
Posts: 571
Joined: Tue Aug 11, 2009 8:47 pm
Location: Travelling around in Europe

I don't know the range of the minimap in either light seconds or km.

Yet, I do know that the minimap range (+/-) is:

Code: Select all

<Weapon
  missileSpeed=  "80"
  lifetime=      "60"
  />
In other words, if AssumedPseudonym drops us the formula on how to calculate weapon range from missileSpeed and lifetime, you can use the above to calculate the minimap diameter.

Edit:
missileSpeed= The speed of the projectile, in % of light-speed.
lifetime= The number of ticks that the projectile will live for.
1 tick is 2 in-game seconds.

so:
(60 * 2) * (80/100) = 96 light seconds = 28,780,075.968 km (so maybe the minimap is 100 light seconds? sounds kinda logical?)

but AssumedPseudonym's formula says: 449,688.687 km ?
so we have a discrepancy of 94.5 light seconds.



~Pixelfck
Image
Download the Black Market Expansion from Xelerus.de today!
My other mods at xelerus.de
NMS
Militia Captain
Militia Captain
Posts: 569
Joined: Tue Mar 05, 2013 8:26 am

Lifetime is in ticks, which are 30ths of a second (real time). With the 60:1 time scale that corresponds to each tick being 2 seconds (game time). Speed is in percent of lightspeed.

So lifetime * speed / 50 gives the range in light seconds.

LRS range is 100 light seconds.

Also, I suspect that the speed of light or the scale is approximated so that one pixel is exactly 24 light seconds.
Last edited by NMS on Fri May 22, 2015 10:11 pm, edited 1 time in total.
User avatar
pixelfck
Militia Captain
Militia Captain
Posts: 571
Joined: Tue Aug 11, 2009 8:47 pm
Location: Travelling around in Europe

NMS wrote:Also, I suspect that the speed of light or the scale is approximated so that one pixel is exactly 24 light seconds.
I checked this in-game. The scale is calculated from 1 pixel = 12,500 km and the value for 1 light second is not rounded up to 24 pixels: if you place two 1 pixel wide stations 60 light seconds apart, there are 1439 pixels between them. If it was rounded to 24 it would have been 1440 pixels.

~Pixelfck
Image
Download the Black Market Expansion from Xelerus.de today!
My other mods at xelerus.de
george moromisato
Developer
Developer
Posts: 2997
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

pixelfck wrote:
NMS wrote:Also, I suspect that the speed of light or the scale is approximated so that one pixel is exactly 24 light seconds.
I checked this in-game. The scale is calculated from 1 pixel = 12,500 km and the value for 1 light second is not rounded up to 24 pixels: if you place two 1 pixel wide stations 60 light seconds apart, there are 1439 pixels between them. If it was rounded to 24 it would have been 1440 pixels.

~Pixelfck
Internally, the game tracks (most) positions in kilometers and converts to pixels at paint-time.
Post Reply