freeman129 Posted August 25, 2013 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 11 Reputation: 3 Joined: 06/28/13 Last Seen: November 2, 2013 Share Posted August 25, 2013 (edited) Hello everyone Before introduction, I apologize for my poor english... If you find something mean weird, please let me know. ------------------------------------------------------------------------------------------------------------------ Started: - 20/06/2013 Developer: freeman129 General Info: Items's price would change, when someone buy/sell them. Player buy many A items, and then the A item's price will be increase.Player sell many B items, and then the B item's price will be decrease. Main System: This inflation is linear formula, new_price = new_price + origin_price * buy_sell_change / inflation inflation var. is constant and it according to item's type. Init: -0.5*inflation <= buy_sell <= inflation show diagram below: ------------------------------------------------------------------------------------------------------------------ If someone buy/sell, server will add/minus sum of arithmetic sequence to your deduct/get money. The sum of arithmetic sequence just like the area of the triangle. ex: If someone buy many A items and then sell all A items, just like diagram below: ------------------------------------------------------------------------------------------------------------------------------------- Other Mechanism: This system add auto-recover function, it means, manager can set timer to recover the changed items(be close to origin price). File Modification: I modify some file in conf/ conf/battle/ src/map/ src/config/ I also modify itemdb datastructure, I add 3 data are 'origin_value_buy' (int). 'inflation' (int) and 'buy_sell' (int), and change 2 data structure are 'price_buy' (float) and 'price_sell' (float). This version , dbs must on sql. Test Video: Download: Github (Git clone from rathena github, and then git push origin master on my github with inflation.) This project is not perfect, so welcome to modify it to perfect. If you want to use that, please back up your original version! and you must use item_db_inflation_re . mob_db_re and mobskill_db_re on sql. Thank you for reading~ Edited September 2, 2013 by freeman129 2 Quote Link to comment Share on other sites More sharing options...
Neo-Mind Posted August 25, 2013 Group: Members Topic Count: 22 Topics Per Day: 0.00 Content Count: 806 Reputation: 221 Joined: 03/13/12 Last Seen: September 17, 2024 Share Posted August 25, 2013 Interesting concept Quote Link to comment Share on other sites More sharing options...
Tepoo Posted August 25, 2013 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 104 Reputation: 4 Joined: 02/06/12 Last Seen: September 13, 2022 Share Posted August 25, 2013 fail concept. because it indeicates that ever player who is inflicted by this system is playing since the start of the server. example: Player 1 is playing from day 1: started to level his first character and bought some red potions for 50zeny. he is able to kill 300monsters with these potions. Player 2 starts playing on day 100 when the inflation is allready going his way and a red potion is not costs 50zeny anymore, its costs 80zeny. he is only able to kill 170monsters with these potions. both had the same build, but you gave the player who comes new to your server a disadvantage as he have to pay more for the potions in the same situation then another player some weeks ago. in the real world its maybe working, but in a game where you are starting completly from 0. this system is fail. Quote Link to comment Share on other sites More sharing options...
freeman129 Posted August 25, 2013 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 11 Reputation: 3 Joined: 06/28/13 Last Seen: November 2, 2013 Author Share Posted August 25, 2013 (edited) Thx to @Tepoo The main purpose of this project is to restrain zeny increase exponentially by time (if players don't want be punish of inflation, they must change the economic monster, or just to wait the auto-recover function come), and increase alchemist's 'repare potion' skill to exert. Older players have more superiority than the newer players, it's true , when everyone follow the same way. This project provide the mechanism, what server execute routine auto-recover function periodicity(make the changed items to be close to origin price). Edited August 25, 2013 by freeman129 Quote Link to comment Share on other sites More sharing options...
Drakkus Posted August 25, 2013 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 386 Reputation: 15 Joined: 11/17/11 Last Seen: September 13, 2024 Share Posted August 25, 2013 Interesting project looking forward on this. wish you luck! Quote Link to comment Share on other sites More sharing options...
Neo-Mind Posted August 26, 2013 Group: Members Topic Count: 22 Topics Per Day: 0.00 Content Count: 806 Reputation: 221 Joined: 03/13/12 Last Seen: September 17, 2024 Share Posted August 26, 2013 fail concept. because it indeicates that ever player who is inflicted by this system is playing since the start of the server. example: Player 1 is playing from day 1: started to level his first character and bought some red potions for 50zeny. he is able to kill 300monsters with these potions. Player 2 starts playing on day 100 when the inflation is allready going his way and a red potion is not costs 50zeny anymore, its costs 80zeny. he is only able to kill 170monsters with these potions. both had the same build, but you gave the player who comes new to your server a disadvantage as he have to pay more for the potions in the same situation then another player some weeks ago. in the real world its maybe working, but in a game where you are starting completly from 0. this system is fail. good point. One idea I am thinking (maybe stupid) - Add an exclusion list for items that would not be suffered by the inflation system. We could include Items like red pots & the like that would not contribute much (if not 0) to zeny increase. *waits for counter point* 1 Quote Link to comment Share on other sites More sharing options...
freeman129 Posted August 26, 2013 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 11 Reputation: 3 Joined: 06/28/13 Last Seen: November 2, 2013 Author Share Posted August 26, 2013 (edited) to @Vlync This project is available, just download the files from Github,and cover your trunk folder(before cover, please back up your original version). These files work in trunk 17459. thx to @NeoMind Items' inflation according to items' type :-------------------------------------------------------------------------------------------item's type data | init inflation constant-------------------------------------------------------------------------------------------0 = Usable : healing | 25002 = Usable : other | 10003 = Misc | 4004 = Weapon | 1005 = Armor | 1006 = Card | 1007 = Pet Egg | 1008 = Pet Equipment | 10010 = Arrow/Ammunition | 50000011 = Usable : delayed consumption | 1000default | 2000------------------------------------------------------------------------------------------- If you don't want to inflation something like red potion,you can modify trunk/src/map/itemdb.h,and change #define INFLATION_USABLE_HEALING 2500 to #define INFLATION_USABLE_HEALING 0 or just increase the inflation number to slow down players stress. By the way, I don't test that in multiplayer's situation, so I don't kown what the data is appropriate. I think, maybe the suitable data relate to number of player in server. Edited August 26, 2013 by freeman129 1 Quote Link to comment Share on other sites More sharing options...
Tepoo Posted August 26, 2013 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 104 Reputation: 4 Joined: 02/06/12 Last Seen: September 13, 2022 Share Posted August 26, 2013 your work is pretty awesome, i wish i would have such knowledge about the sourcecode and implementation of rathena. me for myself, implemented into my server a npc who can convert zeny into credits for the cash shop. i created a economy system where the balance of zeny > credits gets calculated. there more zeny are on the server, there more you have to pay for 100credits. i think this is a good start to prevent a inflation. but its not a work like yours. i tought about how to improve this possiblity, i think a new player indicator would be a good solution. as you know, kids are having advantages compared to adults. cheaper tickets for the train for example. as the database stores the registration time, you could imlement a check (when account is junger then 1-2months dont inflict this account to the inflation system) maybe this could solve the problem. Quote Link to comment Share on other sites More sharing options...
freeman129 Posted August 27, 2013 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 11 Reputation: 3 Joined: 06/28/13 Last Seen: November 2, 2013 Author Share Posted August 27, 2013 (edited) to @Tepoo After read your last reply, I realize what my project isn't the inflation, just like something fake inflation XD. It just restrain zeny increasing fast by time, and I think I give it a wrong name... By the way, your idea is cool. In your idea, the ratio of zeny and credit is important. I think how to judge who is new player is important, because if there are so many advantages to create new character, someone would use it to destroy the balance of the world. Or how to judge what new player need and would not affect the world. Edited August 27, 2013 by freeman129 Quote Link to comment Share on other sites More sharing options...
kangfredy Posted September 1, 2013 Group: Members Topic Count: 112 Topics Per Day: 0.02 Content Count: 388 Reputation: 4 Joined: 05/01/12 Last Seen: October 25, 2022 Share Posted September 1, 2013 can u make diff for this?maybe this is usefull hehehe awesome project O_Oa....heheh i need for change log with origin... Quote Link to comment Share on other sites More sharing options...
Tepoo Posted September 1, 2013 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 104 Reputation: 4 Joined: 02/06/12 Last Seen: September 13, 2022 Share Posted September 1, 2013 @freeman: in the login table there is a creation date. so you can differ which account is new and which one is old. me personaly would also implement a secure system which checks if a completly new account is trading with a allready existing old account, as they could abuse the status of the new account to buy items cheaper for older players. so the system would recognize if a old player is giving much money or items to a new account. then the new accounts gets removed from the protection system and is also a "inflation" account. Quote Link to comment Share on other sites More sharing options...
freeman129 Posted September 2, 2013 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 11 Reputation: 3 Joined: 06/28/13 Last Seen: November 2, 2013 Author Share Posted September 2, 2013 to @kangfredy I git clone from rathena github, and then git push origin master on my github with inflation. I already modify the download link. By the way, this is my first time to use git, so ... if this has some problems, please let me know. to @Tepoo Your solution is nice. I think you have started to explore. Good luck, and if you have problems, please let me know, maybe I can help you or just discuss. Quote Link to comment Share on other sites More sharing options...
kangfredy Posted September 4, 2013 Group: Members Topic Count: 112 Topics Per Day: 0.02 Content Count: 388 Reputation: 4 Joined: 05/01/12 Last Seen: October 25, 2022 Share Posted September 4, 2013 to @kangfredy I git clone from rathena github, and then git push origin master on my github with inflation. I already modify the download link. By the way, this is my first time to use git, so ... if this has some problems, please let me know. to @Tepoo Your solution is nice. I think you have started to explore. Good luck, and if you have problems, please let me know, maybe I can help you or just discuss. hm...sorry can u give me raw for the change?no full with ratehan..just coding.with ekstension diff??or can u give me file what should i change this.i will make diff for u..heheheh Quote Link to comment Share on other sites More sharing options...
freeman129 Posted September 5, 2013 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 11 Reputation: 3 Joined: 06/28/13 Last Seen: November 2, 2013 Author Share Posted September 5, 2013 to @kangfredy I git clone from rathena github, and then git push origin master on my github with inflation. I already modify the download link. By the way, this is my first time to use git, so ... if this has some problems, please let me know. to @Tepoo Your solution is nice. I think you have started to explore. Good luck, and if you have problems, please let me know, maybe I can help you or just discuss. hm...sorry can u give me raw for the change?no full with ratehan..just coding.with ekstension diff??or can u give me file what should i change this.i will make diff for u..heheheh Do you mean this bfd856dcaf6fddd1b45ba8de5d3b66649f5d85ba ?(github commit diff) Github commit diff bfd856dcaf6fddd1b45ba8de5d3b66649f5d85ba link. Quote Link to comment Share on other sites More sharing options...
kangfredy Posted September 5, 2013 Group: Members Topic Count: 112 Topics Per Day: 0.02 Content Count: 388 Reputation: 4 Joined: 05/01/12 Last Seen: October 25, 2022 Share Posted September 5, 2013 no i mean like this (filename.patch) so people can see the diff and can easy to add this feature. 1 Quote Link to comment Share on other sites More sharing options...
freeman129 Posted September 6, 2013 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 11 Reputation: 3 Joined: 06/28/13 Last Seen: November 2, 2013 Author Share Posted September 6, 2013 (edited) no i mean like this (filename.patch) so people can see the diff and can easy to add this feature. I use Google to search some informations about diff and patch. And then , I try to make my first patch. The original source code is trunk_17511(origin), first, I create a copy of trunk_17511(origin) which named trunk_17511(inflation), and then modify the trunk_17511(inflation). second, I open a terminal , and then type "diff -aur trunk_17511\(origin\) trunk_17511\(inflation\) > trunk_17511_inflation.patch". third, I create an other folder which contains a copy of trunk_17511(origin) and trunk_17511_inflation.patch, and then type "patch --dry-run -p0 -i trunk_17511_inflation.patch", it print the success output looks like this: patching file 'trunk_17511(origin)/conf/battle/misc.conf' patching file 'trunk_17511(origin)/conf/inter_athena.conf' patching file 'trunk_17511(origin)/src/config/renewal.h' patching file 'trunk_17511(origin)/src/map/battle.c' patching file 'trunk_17511(origin)/src/map/battle.h' patching file 'trunk_17511(origin)/src/map/clif.c' patching file 'trunk_17511(origin)/src/map/itemdb.c' patching file 'trunk_17511(origin)/src/map/itemdb.h' patching file 'trunk_17511(origin)/src/map/map.c' patching file 'trunk_17511(origin)/src/map/map.h' patching file 'trunk_17511(origin)/src/map/npc.c' patching file 'trunk_17511(origin)/src/map/npc.h' patching file 'trunk_17511(origin)/src/map/pc.c' patching file 'trunk_17511(origin)/src/map/pc.h' and then, I type "patch -p0 -i trunk_17511_inflation.patch", and it do a good job. I upload the trunk_17511_inflation.patch to rAthena, and the download page here. Edited September 6, 2013 by freeman129 Quote Link to comment Share on other sites More sharing options...
kangfredy Posted September 6, 2013 Group: Members Topic Count: 112 Topics Per Day: 0.02 Content Count: 388 Reputation: 4 Joined: 05/01/12 Last Seen: October 25, 2022 Share Posted September 6, 2013 like this congrats for conclution ur project..do you want to improve again? Quote Link to comment Share on other sites More sharing options...
freeman129 Posted September 7, 2013 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 11 Reputation: 3 Joined: 06/28/13 Last Seen: November 2, 2013 Author Share Posted September 7, 2013 (edited) like this congrats for conclution ur project..do you want to improve again? thx to kangfredy but what is the improve meaning? I come up with new ideas about this (floating item price). 1. Limited supply of goods in NPC shop. - Like buying store, but it add floating item price. - This will let inflation be more real. 2. Stock market - ex: Prontera pharmaceutical . Izlude blacksmith factory ...and so on. - Changes in the value of stocks according to the inflation of items. + ex: Prontera pharmaceutical provides red potions. When red potion's buy_sell be increase, Prontera stock's price will be increase. 3. Black market - Black market randomly sell what players sold. I don't have much time, so I slowly get it done, and enjoying it. Edited September 7, 2013 by freeman129 Quote Link to comment Share on other sites More sharing options...
Nitrate Posted February 2, 2014 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 25 Reputation: 0 Joined: 12/10/13 Last Seen: August 30, 2017 Share Posted February 2, 2014 like this congrats for conclution ur project..do you want to improve again? thx to kangfredy but what is the improve meaning? I come up with new ideas about this (floating item price). 1. Limited supply of goods in NPC shop. - Like buying store, but it add floating item price. - This will let inflation be more real. 2. Stock market - ex: Prontera pharmaceutical . Izlude blacksmith factory ...and so on. - Changes in the value of stocks according to the inflation of items. + ex: Prontera pharmaceutical provides red potions. When red potion's buy_sell be increase, Prontera stock's price will be increase. 3. Black market - Black market randomly sell what players sold. I don't have much time, so I slowly get it done, and enjoying it. like wow, this is some next level ideas. looking forward for it. do it! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.