DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • May 18, 2013, 10:56:20 PM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: [1]   Go Down
  Print  
Author Topic: paying for weapons and armor with gems?  (Read 2641 times)
0 Members and 1 Guest are viewing this topic.
Blue
Member

Offline Offline

Posts: 4


View Profile
« on: March 01, 2010, 12:08:11 PM »

Any idea how do i make weapons and armor that could be only bought with gems? I don't see such option in admin grotto... maybe there's mod for that? If not maybe someone could suggest me which files should i look at? (I know some php... I'm by no means expert but I think I could code mod if I would look around a bit...)

edit - What I mean is that I'd like to have basic weapons available for gold and more advanced ones that can be only purchased with gems.
« Last Edit: March 01, 2010, 12:13:35 PM by Blue » Logged
Elessa
Faerie
Mod God
*****
Offline Offline

Posts: 3592


short, sweet and to the point


View Profile WWW
« Reply #1 on: March 01, 2010, 01:34:16 PM »

* Elessa points to the board

what version are you using? 0.9.7 or 1.x.x?

are ye looking to write a modification to code or a module which hooks into the core?
Logged

Uuma ma ten rashwe, ta tuluva a lle

Play the latest beta version here on LoGD DragonPrime - Axebridge
Afkamm
Mod God
*****
Offline Offline

Posts: 1563

MarcTheSlayer


View Profile WWW
« Reply #2 on: March 01, 2010, 02:00:07 PM »

The weapon and armour shops in both versions are hard coded to use only gold. A knowledge of coding in php is required to change this. Smiley
Logged

Brendan
I am Brendan.
Mod God
*****
Offline Offline

Posts: 823


View Profile
« Reply #3 on: March 01, 2010, 02:11:40 PM »

Quote
edit - What I mean is that I'd like to have basic weapons available for gold and more advanced ones that can be only purchased with gems
Quote
The weapon and armour shops in both versions are hard coded to use only gold. A knowledge of coding in php is required to change this. Smiley
I dont think he wants them changed, im sure he means to keep the weapons the way they are and have a seprate place that sells weapon for gems..

@Elessa
Judging by that other thread he posted in, im guessing its 9.7  Smiley

Quote
I just installed 0.9.7 and tried to go to dark horse tavern but i got this error:
« Last Edit: March 01, 2010, 02:13:46 PM by Oak » Logged
Elessa
Faerie
Mod God
*****
Offline Offline

Posts: 3592


short, sweet and to the point


View Profile WWW
« Reply #4 on: March 01, 2010, 06:24:39 PM »

if he is using v 0.9.7 he will have to code the shop directly the way he wants it to be.

i suggest looking in the downloads at some of the modification code there that may be used as a springboard to making what he wants. 

otherwise, he needs to learn PHP.  the reason for the existence of v 1.x.x. is that people with no experience in PHP can run a game and add third party modules that perform the actions they desire.
Logged

Uuma ma ten rashwe, ta tuluva a lle

Play the latest beta version here on LoGD DragonPrime - Axebridge
Blue
Member

Offline Offline

Posts: 4


View Profile
« Reply #5 on: March 02, 2010, 09:20:12 AM »

Yes, 0.9.7 and yes I know some PHP... I just wonder if there's anything I could base my work on available... I guess I'll look in downloads, maybe there's some code I could learn from...

What I want is... hmmm maybe it's best solved by making two shops? Like, you know - "regular" weapons and pro weapons store. And these in "pro" store could be only purchased with gems but standard weapons would be left the way they are. Or I could find a way to keep both types in one shop file, i guess...

I looked into database and for weapons there's 'value' field which specifies price in gold... So I probably should make another field specifying gem price (if I want this in one store). I guess I should look at shop php file and find which part actually "sells" the item? Heh...

Sorry, I can code a bit but I'm more of a sysadmin than coder Wink

Edit: Duh, whe I look at it I guess I could just copy table structure and have separate table for "pro" weapons and then just copy "buying" part from weapons.php, change [gold] to [gems] (?), paste it below current weapons and I'd have "normal" weapons list on top of page and "pro" below? How do you think? It might work or is my thinking flawed?
« Last Edit: March 02, 2010, 09:30:24 AM by Blue » Logged
Talisman
Administrator
Mod God
*****
Offline Offline

Posts: 5427



View Profile WWW
« Reply #6 on: March 02, 2010, 11:29:41 AM »

If I were going to implement something like this in .97, applying gem values as an option to buying existing weapons and armour, I would just modify the existing shop.

Add a gemvalue field to the database.  Edit the shop code to provide cost in gems and gold with links to deduct appropriate items from the user.  I'd probably take it a step further to have some valued at a combination of gold AND gems.

Remember, though, that something which appears simple on the surface isn't always as straightforward as it seems.

You'll need to factor in something to provide suitable renumeration when the weapon is sold.  You need to prevent it from becoming a means for players to convert gems to cash and vice versa gembank style.

You'll need to modify the armour and weapon editors to take the added value fields into account for creation/modification of weapons.

All very "do-able", just need to consider the different aspects of your project.  In this case, I'd be modifying the existing shop ssytem instead of creating a parallel one.
Logged

Play the latest beta version here on DragonPrime
Elessa
Faerie
Mod God
*****
Offline Offline

Posts: 3592


short, sweet and to the point


View Profile WWW
« Reply #7 on: March 02, 2010, 02:21:53 PM »

as the stables have beasts which sell for a combination of gems, gold or gems plus gold, ye might want to take a look at the code there for some ideas.
Logged

Uuma ma ten rashwe, ta tuluva a lle

Play the latest beta version here on LoGD DragonPrime - Axebridge
robert
Old Dog
Moderator
Mod God
*****
Offline Offline

Posts: 1045


LoGD Buff!


View Profile WWW
« Reply #8 on: March 04, 2010, 02:58:08 AM »

........................ ........................ ......
Edit: Duh, whe I look at it I guess I could just copy table structure and have separate table for "pro" weapons and then just copy "buying" part from weapons.php, change [gold] to [gems] (?), paste it below current weapons and I'd have "normal" weapons list on top of page and "pro" below? How do you think? It might work or is my thinking flawed?

One of the biggest joys of v097 is that you are only limited by your ability to code.

What you suggest can work, yes. Or you can go the 2 shoppe route as you first mentioned, one selling gear for gold the other for gems OR have one shoppe selling both!

I would take it one step further  Wink
 - the gold bought weapons would get damaged over time and need constant repairs.
 - the gem bought weapons would be more durable and require much less repairs.
For this to work, you would have to recode your battle scripts, add a repair shoppe, add new fields for gear damage, toss in a simple gear dmg bar, and of course recode the shoppes that sell the gear.
Just food for thought, ...enjoy!   Cool
Logged

Soverytired
Militia
**
Offline Offline

Posts: 24


Have the attitude of gratitude!


View Profile WWW
« Reply #9 on: October 24, 2010, 05:37:39 AM »

Being a born heretic, I added a grand exchange to the game where everything is tradable, including hit points (deducted from maxhitpoints) and experience, gems, gold, rations, etc.

To make the trades something other than a gem laundering exercise I added in a simple multiple randomiser so that each and every time the exchange processes a choice the values re-randomise- ie trade 1 takes place at a rate of 7 Gems for 3675gp, when you click to do that when it re-outputs the rate is now 4 Gems for 7000gp or something. Basically like a second by second stock market trade without the insider trading.

Although I also added a Thief only ability to manipulate the prices.

I think the more variety in purchasing and items the better.

Another idea would be to have hit point sacrifice to boost weapon damage- like a sort of blood ritual thingy that takes a hit point and adds it to the weapon atk or some such.
Logged

Goldfish Lake (LOGD 0.97xx) http://www.hottestontv.com.au/loop
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Welcome to DragonPrime - The LoGD Resource Community!

Support Us
$100 raised this year
Your help is greatly appreciated!
Who's Online
28 Guests, 1 User
Aeo
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search