ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
Exposing PDA data

Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  20:02:46  28 October 2012
profilee-mailreply Message URLTo the Top
el_bhm
(Novice)
 
On forum: 10/28/2012
Messages: 5
Exposing PDA data

Question is short and sweet.

Is there a way to expose the PDA data, such as logs, maps, inventory, etc via a mod/SDK?
I am guessing the simplest way to just make a server type mod that would expose the data on some port in some format.

Bonus question. Where are the docs for anything like that? Googling turns up jack sh**.
  23:31:12  28 October 2012
profilee-mailreply Message URLTo the Top
SetaKat
Ex modder, Zones only ferret and will someday release a game
(Resident)

 

 
On forum: 02/20/2010
 

Message edited by:
SetaKat
10/28/2012 23:31:40
Messages: 6340
Nope.
You'll need to extensively hack and modify the engine code to even get at the PDA.
And there isn't any documentation on doing that, not any that could be found on google. It is possible to make server mods, they are just *really* limited in what they can do, and even then, they focus more on ingame moddable content.

It is possible to create a PDA mod that emulates most of the features of the games default PDA, but for SoC, its a waste of time as it would just end up inferior to the default PDA. Not to mention the amount of time and effort needed to do such a thing, not to mention the level of programming skill to pull it off.
  00:31:48  29 October 2012
profilee-mailreply Message URLTo the Top
el_bhm
(Novice)
 
On forum: 10/28/2012
 

Message edited by:
el_bhm
10/29/2012 0:32:03
Messages: 5
Thanks for answering.

The idea I have in mind is exposing/getting all player related data and pass it to an another app. An android app.

The idea is to use a smartphone as the PDA.
Seeing Lost Alpha that modifies PDA very extensively and mods that add stats ( as far as I understand) it seems in a realm of possibility. Problem is I cannot find anything useful.

If you are seeing PDA app in realm of possibility, could you push me in a general direction how to approach it? Code samples, SDK related docs.
  02:21:48  29 October 2012
profilee-mailreply Message URLTo the Top
Daemonion
All About Audio
(Resident)

 

 
On forum: 09/27/2011
Messages: 567
Wow, that sounds really awesome if you were to get that working.
  03:12:58  29 October 2012
profilee-mailreply Message URLTo the Top
SetaKat
Ex modder, Zones only ferret and will someday release a game
(Resident)

 

 
On forum: 02/20/2010
 

Message edited by:
SetaKat
10/29/2012 3:13:11
Messages: 6340

---QUOTATION---
Thanks for answering.

The idea I have in mind is exposing/getting all player related data and pass it to an another app. An android app.
---END QUOTATION---


Well, take a look at pda.script. There is some data in there that the default PDA references (get_stat function). db.actor in the scripts describes the actor object, which is a game_object server object, so looking in lua_help.script for the game_object class, which contains other methods and properties which might be of use.
And are you talking about an ingame app/interface, or an actual android app in RL?


---QUOTATION---
The idea is to use a smartphone as the PDA.
Seeing Lost Alpha that modifies PDA very extensively and mods that add stats ( as far as I understand) it seems in a realm of possibility. Problem is I cannot find anything useful.
---END QUOTATION---


99.7% of the PDA stuff is handled internally by the engine, so there is no way to get at it. The remaining 0.3% can be accessed as I pointed out above. However, since you're mostly after player data, what I've pointed out above will cover nearly everything you need off the top of my head, and if I'm understanding you correctly.
And Lost Alpha modifies the engine to change the PDA, which is beyond the abilities of the rest of us modders.


---QUOTATION---
If you are seeing PDA app in realm of possibility, could you push me in a general direction how to approach it? Code samples, SDK related docs.
---END QUOTATION---


Well, documentation for the SDK is virtually non existant, and the SDK mainly deals with ingame content (meshes, levels, textures, sounds, shaders, etc).
Getting the actors health by script is fairly easy
actor_health =  db.actor.health

will get the actors health.
actor_icon = db.actor:character_icon()

will get the players character icon.
The get_stat function is used by simply going
some_stat = pda.get_stat(#)

where # is the number of the stat you wish to get.
Mods that add new stats, if done properly, should be accessible by either pda.get_stat(...), xr_statistics.script, or in their own statistics script (if it is a large mod)
  11:27:26  29 October 2012
profilee-mailreply Message URLTo the Top
el_bhm
(Novice)
 
On forum: 10/28/2012
Messages: 5
I am talking real app for Android OS.

Idea is too pull as much data important to the player as possible and push it to the app. Without much diving into the subject I was thinking of making a mod that works in a server type way as passing info over LAN would be the easiest. Bluetooth while may prove better for battery, implementation might prove far more problematic. Just like "over USB" communication.

I suggest not getting hopes up too early. I am looking around and weighing how possible it is and how useful the app will be. Making a toy misses a point a bit.

I'll look into it further and ask if I need to know something more. Sounds alright so far.

Talking engine.
Reading moddb supposedly some modders have access to the code. How truthful is that?

Bonus question.
Was there anyone using SDK tools through Wine (compatibility layer for *nix system as Linux and Mac/OSX)?
  16:03:15  29 October 2012
profilee-mailreply Message URLTo the Top
Alundaio
Sad Clown
(Resident)

 

 
On forum: 04/05/2010
 

Message edited by:
Alundaio
10/29/2012 16:13:21
Messages: 2230
At one point I wanted to "socialize" Call of Pripyat (Though SoC is the more popular game) to store the player's data in a database (mySQL) in leader board format so that players could compete or see how their buddy is doing. An android app would be useful for that.

You could even get a little crazy with it, too. I was able to make a text console from the menu screen for debugging. Something similar could be used to create a chat box in the menu to feed data to a database to talk to other players in game or on a forum similar to how Ajax forum chat boxes work permitting you get LuaSQL to run from a script.
  23:06:10  29 October 2012
profilee-mailreply Message URLTo the Top
SetaKat
Ex modder, Zones only ferret and will someday release a game
(Resident)

 

 
On forum: 02/20/2010
Messages: 6340

---QUOTATION---
I am talking real app for Android OS.

Idea is too pull as much data important to the player as possible and push it to the app. Without much diving into the subject I was thinking of making a mod that works in a server type way as passing info over LAN would be the easiest. Bluetooth while may prove better for battery, implementation might prove far more problematic. Just like "over USB" communication.

I suggest not getting hopes up too early. I am looking around and weighing how possible it is and how useful the app will be. Making a toy misses a point a bit.
---END QUOTATION---


What I would do here is when a game is loaded, and in the main menu, press a button, which in turn would write the players data (rank, kills (stalker and monster), money earned/spent, game difficultly, etc) to an external file, which you can then upload into the app. This would probably be the simplest approach.


---QUOTATION---
Talking engine.
Reading moddb supposedly some modders have access to the code. How truthful is that?
---END QUOTATION---


True. Lost Alpha developers have been given the source code for all 3 games, but they aren't allowed to distribute it. But practically all the information you are after is accessible via scripts or exported engine functions.


---QUOTATION---
Bonus question.
Was there anyone using SDK tools through Wine (compatibility layer for *nix system as Linux and Mac/OSX)?
---END QUOTATION---


There was someone asking about the SDK on Linux/Unix, but they were recommended to use Wine. Even then, the SDK is heavy on the system, and having to go through a compatibility layer would most likely make things worse.

Off the top of my head, you can access this data via script and exported engine functions:
Actor health, stamina, radiation level, psi health and bleeding level
Actor rank, reputation and icon
Current weapons and suits
Contents of inventory
# of accepted, completed, failed and cancelled tasks
# of money earned, spent and current
# of stashes found
# of stalkers and mutants killed
Current time (and probably the ingame date as well, I'll have to check)

This is probably all the data you'll need for a while, and if your purpose is to compare players stats with the app, then this is all you'll probably need.
  21:24:06  30 October 2012
profilee-mailreply Message URLTo the Top
el_bhm
(Novice)
 
On forum: 10/28/2012
Messages: 5
Unless Alundaio had a different approach of doing his stuff, seems like it is the way things will go. Doing much I/O is my fave, but it is what it is. Reading from the memory trainer style is out of my league as of now.

You were saying press a button. Judging by mods we've seen there should be a some kind of event that monitors player's data on which I could just trigger a script. But that's going far into as of now.

Now, time for some time and space warping to get that project off the ground.
If anything happens and it is in a somewhat working state, I'll open the source.

Fingers crossed, but no ETA.
  05:27:40  31 October 2012
profilee-mailreply Message URLTo the Top
ddraig
Senior Resident
 

 
On forum: 06/19/2012
Messages: 158
I admit I don't know much about this, but would it be possible to write information to a config file, which is then read by whatever or modified by that other program that then gets read by the game etc.
 
Each word should be at least 3 characters long.
Search:    
Search conditions:    - spaces as AND    - spaces as OR   
 
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
 

All short dates are in Month-Day-Year format.


 

Copyright © 1995-2020 GSC Game World. All rights reserved.
This site is best viewed in Internet Explorer 4.xx and up and Javascript enabled. Webmaster.
Opera Software products are not supported.
If any problem concerning the site functioning under Opera Software appears apply
to Opera Software technical support service.