Get & Use Currency
Unlike Hard Currency (currency earned through cash payment), Soft Currency (currency earned through game play) earnings are not recorded because they are too frequent in Idle games. Call GetCurrency method to record earnings of Hard Currency only, and call UseCurrency method to record the consumption of both Soft Currency and Hard Currency.
- Call UseCurrency and GetInfrastructure methods when a user acquires Infrastructure object that affects the style and pace of the entire game.
UseCurrency (open a new Infrastructure with gold)
player_uuid* |
{ player_uuid } |
character_uuid* |
{ TentuPlayKeyword._DUMMY_CHARACTER_ID_ } |
currency_slug* |
{ GOLD } |
currency_quantity* |
2500 |
currency_total_quantity |
285700 |
where_to_entity |
entity.GetInfraStructure |
where_to_category_slug |
{ customer table } |
where_to_slug |
{ customer table number 2 } |
UseCurrency (open a new Infrastructure with cash)
player_uuid* |
{ player_uuid } |
character_uuid* |
{ TentuPlayKeyword._DUMMY_CHARACTER_ID_ } |
currency_slug* |
{ CASH } |
currency_quantity* |
20 |
currency_total_quantity |
26 |
where_to_entity |
entity.GetInfraStructure |
where_to_category_slug |
{ customer table } |
where_to_slug |
{ customer table number 2 } |
GetInfrastructure (acquire a new Infrastructure)
player_uuid* |
{ player_uuid } |
character_uuid* |
{ TentuPlayKeyword._DUMMY_CHARACTER_ID_ } |
item_slug* |
{ customer table number 2 } |
item_quantity* |
1 |
from_entity |
entity.UseCurrency |
from_category_slug |
{ customer table } |
from_slug |
{ customer table number 2 } |
- Call GetBonus and Get{ Object type } methods when a certain Object is earned as a bonus.
If a user has to conduct a specific action (such as clicking or touching the screen) to earn the bonus, input FALSE at is_automated
for GetBonus method. Otherwise, if the bonus earning process is enitrely automatic, input TRUE.
GetBonus
player_uuid* |
{ player_uuid } |
character_uuid* |
{ TentuPlayKeyword._DUMMY_CHARACTER_ID_ } |
bonus_slug* |
{ skill point } |
bonus_category_slug |
{ customer table } |
is_automated* |
FALSE |
GetCurrency
player_uuid* |
{ player_uuid } |
character_uuid* |
{ TentuPlayKeyword._DUMMY_CHARACTER_ID_ }] |
currency_slug* |
{ CASH } |
currency_quantity* |
5 |
currency_total_quantity |
46 |
from_entity |
entity.GetBonus |
from_category_slug |
{ customer table } |
from_slug |
{ upgrade to level 10 } |
- Call UseCurrency and LevelUpInfrastructure methods when currency is paid to level up a certain Object.
UseCurrency
player_uuid* |
{ player_uuid } |
character_uuid* |
{ TentuPlayKeyword._DUMMY_CHARACTER_ID_ } |
currency_slug* |
{ GOLD } |
currency_quantity* |
128,930 |
currency_total_quantity |
34,230 |
where_to_entity |
entity.LevelUpInfrastructre |
where_to_category_slug |
{ customer table } |
where_to_slug |
{ customer table number 1 } |
LevelUpInfrastructure
player_uuid* |
{ player_uuid } |
character_uuid* |
{ TentuPlayKeyword._DUMMY_CHARACTER_ID_ } |
item_slug* |
{ customer table number 1 } |
item_level_to* |
10 |
item_level_from |
1 |