Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Trade Sytem 1.3

Trade SystemVersion: 1.0
By: silver wind

update(15/02)
fixed a small problem in the scrolling menu.
fixed the grammar.

update(9/02)
new version. fixed a small bug.
now the game won't crash if the item/actor ID is wrong.

update:(8/02)
new version.
* trades are now saved in the save file.
* the system is now accessible from the menu.

Introduction

this is my trade system for RMXP.
It allows players in your game to trade actors, items and gold with other players.
How to use the system:
the system is not online. It uses a trade file, which you can create or read from the trade menu.
once you created a file (trade>>send), send it to a friend via email, Messenger,etc.
your friend must place it in the game folder and select trade>>receive.

Features
  • trade an actor, item or gold with other players.
  • security: encrypted files
  • cancel a trade w/o duplicating the traded object, and without losing it.
  • more security: force your friend to send back a specific actor/item or certain amount of gold.
  • and more security: you can't receive the same file again. players may copy/paste the file to get more items/gold, but they'll just get "Illegal trade. Trade process has stopped."

Screenshots
tradescreen2.jpg



Demo
http://www.mediafire.com/?wgmkzenwjmz
older versions:
http://www.mediafire.com/download.php?dygajjm4zyj
http://myfreefilehosting.com/f/eb12525464_0.29MB
http://www.mediafire.com/download.php?ygv4km3dfy2


FAQ

How do I call the script?
- $scene = Scene_Trade.new

how do I know my player ID? my player name?
- it's shown on the top of the trade window.
by default, the name is Aluxes. NPC in the demo shows how to change the player's
name.

where is the file ?

- in drive c:\

This doesn't work when I put the scripts in my own project !
- when adding the scripts to a new project, copy the common events too.
they must be common event 001 and 002, respectively. (they're used for input)
don't worry about the variable they use(004). once the trade is over,
the variable will contain its old data again.

What does Safe mode do?
-It lets you select which actor, which item, or how much gold your friend must send back. It's done automatically when he confirms the trade. (to actually get them you must get the file from him, and select receive from the menu)

can I use the script if I added new states to game_actor?
- you can add the new states to the file and read them,
simply by adding their NAME to @hash2 in Trade_recieve_data class
and @actorDataName of Game_trade class. if you have a variable called race for each actor,
just add 'race'=>20 to hash2 and 'race' to @actorDataName.


can you make the Trade system a part of the menu?
- maybe in the next version. (already done)

what will be in the next version ?
- I don't promise to make another version, but if I do:
I may show item and actor sprites on the menu, add an option to trade weapons,
and allow multiple files in the game folder by letting the user select the file he wants.

Compatibility

Unknown.
does not require SDK, Netplay or any other script.

Credits and Thanks
credit Avernus if you use the water tile in the demo.

Known Bugs
1. only 1 file can be in the game directory (actor.trd, item.trd, cash.trd)
when selecting 'receive'.
2. if you play a certain rmxp game, and your friend plays an entirely
different rmxp game, you can still trade. (with weird results)

NOT Bugs
1. you can't trade with yourself
the system thinks you already did this trade, because.. well, it complicated.
anyway, you can't do the same trade twice.
you can change this by going to line 153 in game_trade (it says: #return true) and
erasing the '#'
Put the '#' back when you're done testing !
2. you can't trade weapons/armors.
I may implement this in the next version.
3. data about the trades is not saved in the save file.

Author Notes

The system is not finished.
I'm posting it here to get feedback, and improve it.
if you found a way to 'cheat the system', please tell me how you did it.
if you find any bugs/compatibility issues, please post them here.

I forgot to mention the password used to encrypt files.
it's called @encrypt_key (game_trade, line 60). you may want to change it.
* make the password long(80+ chars).
* you can use almost any char: letters, numbers, space and
"! @ # $ % ^ & * () _ + [] : ? . , ; ' / \ + - "
 
I can really see potential in this, why is no one replying to this script?

I am considering to use this in my game...

Suggestion: Let it be accessable in the game. ( Or is it already done? Haven't tested it out yet)
 
Nice idea ^^

I've thought about making this kind of system.
But then I found it is too easy to cheat. I hope you will make it very secure though. ^^

Good luck!
 

cairn

Member

you could probably increase this script's effect range by making it possible to add maps and things like that, making it one powerful updating tool. Good job with what you have already.
 
o.k, I made a new version!
* trades are now saved in the save file.
* you can now start a trade from the menu.
btw, I just realized you CAN'T trade between different games, if the game creator has changed the default password! so problem solved :D

woratana, thanks. I'm doing my best to make the system secure.
it already has encrypted files, and a way to detect what trades you've done already.
cairn, this sounds interesting, but I'll leave this to someone more experienced in ruby/rmxp. I know my limits..
and Justin, if you meant accessible from the menu, it's done.
 
Greatly usable for my NetGame Crisis Saga games, where you can now ask out a +11 RF-Avenger [Dark] weapon from another NGCS player. Hmm... what if I would like to make the trade system and my game universal (from one "episode" to another)? Would it mean copy-paste the previous database and append newer data?
 
if you divided your game into episodes and release each one as a game, yes.
use the same password in all episodes.
note that if episode 1 has 20 items, and someone trades over an item with id 21 the game will crash.
I simply didn't consider something like this. it's easily solved, though.. I think I'll go do that now :)
 
This is so unbelievable. This remembers me of Animal Crossing! You had to choose a present from your inventory and you got a code (The "Trade-file"), your friend had to enter the code and when the town name (Actor ID and Actor name!) was right, you got the sent present. The only problem with the script is the grammar.

I aldeary got a idea; for my next project I'll make a topic where people can post their actor name, ID, what they trade and what they want back and their Tradefile. Then people can access that save-file and trade it. Then Re-upload their file and they traded. Yippee!

I love this.

edit: I love to put effort in good scripts. I corrected the grammar from te demo + the script and re-uploaded it.
http://www.mediafire.com/download.php?tm3modntkne
 

EpE

Member

Great just keep on working on the security ....
I dont like cheaters in games unless you have to because you are unable to pass the game
 

Nyeph

Member

silver wind":2hbggrrh said:
:D
Axules, I don't know what you did, but the demo doesn't work now..
just tell me what where's the grammar wrong and I'll fix it myself.
Grammatical errors that plague perfectionist's minds. E.g. 9 times out of 10 you don't capitalize your letters at the beginning of a sentence. I've just read through the demo and sure it's a great addition and there is nothing wrong, but for people like me that read something and if it doesn't look/sound correct we spend the next few hours correcting each mistake until we are content.

Ah, I hate grammar errors.
 
sorry. English isn't my first language. Good thing Firefox helps my with my spelling when making a forum post. I know I spelled receive wrong. if you find other mistakes, tell me, ok?
 

Nyeph

Member

silver wind":145egf1u said:
sorry. English isn't my first language. Good thing Firefox helps my with my spelling when making a forum post. I know I spelled receive wrong. if you find other mistakes, tell me, ok?
English doesn't have to be your first language to understand that you should capitalize the first letter in a sentence. Your spelling is fine, just your grammar is atrocious.
 
I just capitalized...
...the first letter of sentences
...the first letters of functions, like "Send" or "Recieve' .

Maybe I capitalized one alias or so. for me, it works fine.

Fix it yourself by capitalizing right! (because I did it wrong -.-)

~Axules
 
BUMP
Is anyone interested in new features?
There has been like 30 downloads, so I guess someone's using this.
possible features:
1. An option to disable Actor trading, as it's only good for pet-raising games.
2.Waiting for suggestions ?

Btw, did you know you can use this script for "lottery" events ?
The trainer ID's can be used instead of lottery numbers. Every player pays the lottery manager (trade money for item), and he sends everyone the same file. The trainer ID in the file is randomly selected from the list of participants, so only one can get the item.
 
I kinda gave up on this script.. It's too easy to cheat.
I did make a new version- Trade_SystemDemo5
-It doesn't need common events, and is more tidy(less pages, etc).
-New option: auto-save once a trade is done + a single save-file (can be disabled, see info in the script).
-Trading of actors is disabled by default (to enable, find the line: @disable_actor_trade = true , change true to false)
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top