playMaker

Author Topic: Playmaker and Inventory Pro and EasySave  (Read 4540 times)

vv3

  • Playmaker Newbie
  • *
  • Posts: 31
Playmaker and Inventory Pro and EasySave
« on: June 12, 2018, 03:53:55 PM »
Please help me construct this in Playmaker:

upload the inventory, bank, coins that the player has and also to save from where they are gone (other collections).
save with easysave the inventories (i made allready the connection with mysql db)

I should have a variable to grab from InventoryPlayer.inventoryCollections
and something like

foreach(var slot in myCollection)
{
     if(slot.item != null)
    {
        // Slot contains an item
        // slot.item == item
        // slot.item.currentStackSize == amount of items in single stack
        // slot.item.ID == the item's ID, which can be used to connect ItemDatabase (ItemManager.database)       

I dont know to construct a full code so I would really appreciate your help.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Playmaker and Inventory Pro and EasySave
« Reply #1 on: June 12, 2018, 05:49:12 PM »
Hi.
Does inventory pro not have actions for that?
I believe they do have playmaker support.

vv3

  • Playmaker Newbie
  • *
  • Posts: 31
Re: Playmaker and Inventory Pro and EasySave
« Reply #2 on: June 12, 2018, 06:41:56 PM »
They do have some actions but they dont offer support in making playmaker logic :(
all i got is few lines of ideas that I allready wrote up
I do not know how to write that in a code nor to make it work with playmaker :(
The logic would be to GET the collections from Ipro, itterate throught them and send their values vits easysave or direct with playmaker and a php file hosted on the server in mysql db

vv3

  • Playmaker Newbie
  • *
  • Posts: 31
Re: Playmaker and Inventory Pro and EasySave
« Reply #3 on: June 12, 2018, 06:57:24 PM »
you can check this: http://myprintscreen.com/s/u56b/4f1766a77d

and this:
http://myprintscreen.com/s/u56c/2e80cfa448
.. a lot of loads .. and:
http://myprintscreen.com/s/u56f/3478e0d576

I tried this but nothing happens on the db:
http://myprintscreen.com/s/u56i/a557c85e15

I see some savings though on running the game (they are saved without me opening but still ...):
http://myprintscreen.com/s/u56j/245ac244c0

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Playmaker and Inventory Pro and EasySave
« Reply #4 on: June 13, 2018, 05:20:03 AM »
Hi,
From your 1st image i can see that  there is a 'Get Inventory Player' which i guess will be using arrays and i think works similar to collection.

But there is no 'Get Collection' or Get Items Collection' i do not own inventory pro, and i can't see their code so its to hard to for me make a custom action.

I would suggest to mail the author and say that this action is missing.
and you can mention me, if they need help completing their actions.

Where you able to get the collection in another way?

vv3

  • Playmaker Newbie
  • *
  • Posts: 31
Re: Playmaker and Inventory Pro and EasySave
« Reply #5 on: June 13, 2018, 06:20:19 AM »
I read more about easysave and becasue they only send files to the db, I think i should skip it and go directly inventory-pro and playmaker only.

In this scenario I need to have either a c# file that iterates through Inventory PRO get data and send it to the php file on myserver, either some custom actions in Playmaker (as I am not that good in writing a full c# file).

What the developer told me is this:
"
All the collections are in Devdog.InventoryPro; while all UI eleemnts are in Devdog.InventoryPro.UI
There is a built-in JSON serializer that you can use
"

I am trying to see now what I can understand and do on my own but I would really appreciate your help forward.
The example I showed you before is created by me :), trying to do in Playmaker what I was told to do in C#



djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Playmaker and Inventory Pro and EasySave
« Reply #6 on: June 13, 2018, 07:31:13 AM »
Hi.
If the collection is in a json file, maybe you can use datamaker to grab it.

Here is a tutorial for datamaker :


vv3

  • Playmaker Newbie
  • *
  • Posts: 31
Re: Playmaker and Inventory Pro and EasySave
« Reply #7 on: June 13, 2018, 08:15:49 AM »
Ill watch it thank you!

ps. tolf IPRO developer about you and maybe you will still do something together becasue both ur assets are awesome and I am very sure others would like this kind of saving ;)

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Playmaker and Inventory Pro and EasySave
« Reply #8 on: June 13, 2018, 08:55:09 AM »
Hi.
I do not own playmaker :)

Alex does

But i do make custom actions.

vv3

  • Playmaker Newbie
  • *
  • Posts: 31
Re: Playmaker and Inventory Pro and EasySave
« Reply #9 on: June 13, 2018, 12:46:23 PM »
Datamaker tutorial is about xml. I understood waht to do with XML.
I dont find any examples on json, I just read the json will be converted to xml somehow.
Do you have any direct info/ example I should look at please ?

thank you

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Playmaker and Inventory Pro and EasySave
« Reply #10 on: June 13, 2018, 06:51:21 PM »
Hi.
To be honest i never used json yet with datamaker,

and i saw on the ecosystem that there are 2 datamaker version, one called Datamaker_Xml_Json
But i can't download it directly from the Ecosystem, so i checked in github and i can see that there is also a DataMaker_json_Samples package so maybe that can help.

Here you can find the packages for now :
https://github.com/jeanfabre/PlayMakerCustomActions_U4/tree/master/PlayMaker/Ecosystem/Custom%20Packages/DataMaker

Jean is the author from datamaker, i will contact him to see what the issue is.
And i will experiment with it (json) a bit also :)

1 Am now here, need to sleep....:)

vv3

  • Playmaker Newbie
  • *
  • Posts: 31
Re: Playmaker and Inventory Pro and EasySave
« Reply #11 on: June 14, 2018, 09:52:42 AM »
XML example I got but I don't get what to do on json.
I have to use get json action and then use transform to XML ?
What to use after that to read the XML because in the example I only see how to read from an XML it's already constructed and loaded ?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Playmaker and Inventory Pro and EasySave
« Reply #12 on: June 14, 2018, 10:06:36 AM »
Hi.
you need to use 'convert Json to Xml node'

Then you can use the variable in the Xml actions

and search with xPath Query

It seems that  there is no 'jPath' to search in json.

You need to get the "data Maker_Xml_Json" package btw.

and you can get it now from the Ecosystem (issue solved on the Ecosystem)

vv3

  • Playmaker Newbie
  • *
  • Posts: 31
Re: Playmaker and Inventory Pro and EasySave
« Reply #13 on: June 14, 2018, 01:59:50 PM »
On convert action how do I see the variable ?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Playmaker and Inventory Pro and EasySave
« Reply #14 on: June 14, 2018, 07:19:00 PM »
Hi,
Not sure what you mean, but when playing the game and then do convert you should get the result in the Data Maker Xml Proxy and Xml String

Then you can use the proxy or the variable.

I also made a custom action so that you can test with a json file directly instead of string.
you can get it on the attachment below.