Mirage Source

Free ORPG making software.
It is currently Fri Mar 29, 2024 11:38 am

All times are UTC




Post new topic Reply to topic  [ 41 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Spell Buff
PostPosted: Wed Nov 19, 2008 2:18 am 
Offline
Pro
User avatar

Joined: Wed Sep 20, 2006 1:06 pm
Posts: 368
Location: UK
Google Talk: steve.bluez@googlemail.com
I want a new spell type that increases a stat temporarily for say, 60 seconds.

Not interested in suggestions, just need a tutorial (As this is the tutorial request section).

Thanks :D


Top
 Profile  
 
 Post subject: Re: Spell Buff
PostPosted: Wed Nov 19, 2008 3:11 am 
Offline
Pro

Joined: Mon May 29, 2006 5:01 pm
Posts: 420
Location: Canada, BC
Google Talk: anthony.fleck@gmail.com
I would actually be interested in hearing suggestions.


Top
 Profile  
 
 Post subject: Re: Spell Buff
PostPosted: Wed Nov 19, 2008 7:45 am 
This is easy to do.

Add a variable to the spells to hold the length. Then in the cast spell stuff, check for that spell type, target, and then get the time if it's proper. Then in the gameloop, just check that, if the time is still not run out, then the player's stats are enhanced.

Simple.


Top
  
 
 Post subject: Re: Spell Buff
PostPosted: Wed Nov 19, 2008 6:40 pm 
Offline
Pro
User avatar

Joined: Sun Aug 05, 2007 2:26 pm
Posts: 547
Then what happens if the player logs out perfekt?


on playerlogout or whatever, check to see if the person has a buff (by thier timer). If yes, run the debuff code.

_________________
GIAKEN wrote:
I think what I see is this happening:

Labmonkey gets mod, everybody loves him, people find out his code sucks, he gets demoted, then banned, then he makes an engine called Chaos Engine.


Top
 Profile  
 
 Post subject: Re: Spell Buff
PostPosted: Wed Nov 19, 2008 6:48 pm 
Labmonkey wrote:
Then what happens if the player logs out perfekt?


on playerlogout or whatever, check to see if the person has a buff (by thier timer). If yes, run the debuff code.


I wasn't gonna give all the stuff. :P


Top
  
 
 Post subject: Re: Spell Buff
PostPosted: Thu Nov 20, 2008 12:20 am 
Offline
Knowledgeable
User avatar

Joined: Sun Dec 03, 2006 6:18 am
Posts: 228
Location: NJ, United States
I've actually just recently added buffs to my project. I'm afraid I won't give out my code but if you need any help feel free to contact me.

_________________
[23:30] mvrckoffspring88: Quake brand Noob Sauce


Top
 Profile  
 
 Post subject: Re: Spell Buff
PostPosted: Fri Nov 21, 2008 12:35 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Im using a couple of variables for this:

Client Side:
BoostHPTimer - Displaying how long time its left on the buff.
BoostHP - Displays how much boost you gained

Server Side:
BoostHPTimer - Checking when to end the buff (tickcount)
BoostHP - Used to add the extra MAX HP in this case

Both Sides:
BoostHPDur - How long the spell will last

I started a tut for this but I didn't finish it.. its posted in the admin board.. =/

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject: Re: Spell Buff
PostPosted: Sat Nov 22, 2008 7:04 pm 
Offline
Pro
User avatar

Joined: Wed Sep 20, 2006 1:06 pm
Posts: 368
Location: UK
Google Talk: steve.bluez@googlemail.com
I thought Mirage Source was about sharing codes?

Come on guys, what's the point in having all these help forums if nobody is willing to help?
It's fine saying "Yeah this is how it works", I know how it works, but where to put the code is a different matter.
Me and Drackir already tried to get it working but couldn't, plan B? Ask somebody else.

First of all, the server needs to know what spell was just activated, and who it belongs too. It performs the neccessary action. It also needs to check if the spell has already been activated, and not to activate it again.

I thought it would be easy but it's not.


Top
 Profile  
 
 Post subject: Re: Spell Buff
PostPosted: Tue Nov 25, 2008 5:19 pm 
Offline
Pro
User avatar

Joined: Wed Sep 20, 2006 1:06 pm
Posts: 368
Location: UK
Google Talk: steve.bluez@googlemail.com
William wrote:
I started a tut for this but I didn't finish it.. its posted in the admin board.. =/


Can you PM me the tut?


Top
 Profile  
 
 Post subject: Re: Spell Buff
PostPosted: Tue Nov 25, 2008 6:15 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
It's far from finished. I just realized making the tut would be so much work and I wasn't really up for it. Because I didn't want to make it full copy and paste. Might get around to finishing it at some time.

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject: Re: Spell Buff
PostPosted: Wed Nov 26, 2008 3:47 am 
GameBoy wrote:
I thought Mirage Source was about sharing codes?

Come on guys, what's the point in having all these help forums if nobody is willing to help?
It's fine saying "Yeah this is how it works", I know how it works, but where to put the code is a different matter.
Me and Drackir already tried to get it working but couldn't, plan B? Ask somebody else.

First of all, the server needs to know what spell was just activated, and who it belongs too. It performs the neccessary action. It also needs to check if the spell has already been activated, and not to activate it again.

I thought it would be easy but it's not.


Beggar's can not be choosers. Quit whining. Remember when you claimed to be a great programmer? Now even people who don't program anymore are better than you.

Learn to do it yourself. Quit begging, after you already begged initially. I gave you the base of how to do it and someone followed through with some more of it. Figure it out from there. If you don't know where to put it in MS yet, then you should just go kill yourself. You've worked with MS for years, I'm sure you know your way around. If not, might I suggest you just use your computer for playing solitaire and surfing the internet for porn?


Top
  
 
 Post subject: Re: Spell Buff
PostPosted: Wed Nov 26, 2008 7:24 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Perfekt that might be your opinion. But this board is here for a reason. I would gladly make small tutorials, but this buff thing just takes too much time for me to complete. This was my start, but far and far from finished:

I was going to write a tutorial for adding buff spells. But not making it copy/paste.. and I realized after a few steps that this will take for ever to complete. xD So im not going to do this.. =/

Introduction
I decided to make a tutorial for adding buff spells. This is not going to be anything like a copy/paste tutorial. I will share some code parts and try to explain some areas, but I also want you to figure out a few things on your own. I will not divide the tutorial into a client and a server part, instead I will explain some parts on the client, and how they are linked to the server and visa versa. Also, it's important that you keep something in mind. I'm taking parts from my game now, and my game doesn't have spell types, this means that my spells can have any effects. Like all spell types could be in 1 spell for example.

Step 1, Deciding the Basics:
First of all, I recommend you add a new spell type for the buff spells. For example name it SPELL_TYPE_BUFF. To understand how this is done, you can search for SPELL_TYPE_ADDHP in the client and the server to get some understanding how it looks. You should also keep in mind what kind of buffs you want. I added the ability to boost any of the stats the player has.

Step 2, Setting up the Form:
Now you need to add some text boxes to your frmSpellEditor, kind of like this:
Image
But you need to remember that you also need to do more changes to the form. To the list box that stores the SPELL_TYPES, and also if you want to make the buff window be visible=false if your not creating a buff spell and such. But before you can save them and send them to the server. You need to add the variables for the buffs.

Step 3, Setting up the Variables:
There are many ways of doing this, but the very easiest way is to do the following; The player needs to hold the buff spell num in order to be able to see the spell in action on the client. If the player don't have the buff spell num thats casted on him, he wont be able to see his stats changed and such. Or perhaps you want a nice image for the buff on the game screen when its active. So you should add something similar to this in the playerrec:
Code:
    BoostHPSpellNum As Byte
    BoostMPSpellNum As Byte
    BoostSPSpellNum As Byte
    etc..

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject: Re: Spell Buff
PostPosted: Thu Nov 27, 2008 5:08 pm 
Steve used to brag about how great he was, now he asks for super simple features.

More than the noobs, I might add.


Top
  
 
 Post subject: Re: Spell Buff
PostPosted: Thu Nov 27, 2008 6:50 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Perfekt wrote:
Steve used to brag about how great he was, now he asks for super simple features.

More than the noobs, I might add.

Buff spell isn't a super easy feature. For some it is, but for most it's not.

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject: Re: Spell Buff
PostPosted: Fri Nov 28, 2008 1:22 am 
William wrote:
Perfekt wrote:
Steve used to brag about how great he was, now he asks for super simple features.

More than the noobs, I might add.

Buff spell isn't a super easy feature. For some it is, but for most it's not.


Agreed.

You're taking my posts out of context though. Gameboy brags constantly how great he is. Or, well he used to. I'm saying, for someone as great as he claims he is.. He shouldn't have any issues doing this.


Top
  
 
 Post subject: Re: Spell Buff
PostPosted: Fri Nov 28, 2008 3:37 am 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: Darunada@gmail.com
I had a buff system written for LoM.

Could buff anything in the game, and all buffs were implemented. The game had no way to give you a buff, though, but when you got one it worked lol

_________________
I'm on Facebook! Google Plus LinkedIn My Youtube Channel Send me an email Call me with Skype Check me out on Bitbucket Yup, I'm an EVE Online player!
Why not try my app, ColorEye, on your Android devlce?
Do you like social gaming? Fight it out in Battle Juice!

I am a professional software developer in Salt Lake City, UT.


Top
 Profile  
 
 Post subject: Re: Spell Buff
PostPosted: Fri Nov 28, 2008 8:24 am 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Lea wrote:
I had a buff system written for LoM.

Could buff anything in the game, and all buffs were implemented. The game had no way to give you a buff, though, but when you got one it worked lol

lol =/

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject: Re: Spell Buff
PostPosted: Fri Nov 28, 2008 4:55 pm 
Lea wrote:
I had a buff system written for LoM.

Could buff anything in the game, and all buffs were implemented. The game had no way to give you a buff, though, but when you got one it worked lol


Um..?


Top
  
 
 Post subject: Re: Spell Buff
PostPosted: Fri Nov 28, 2008 7:26 pm 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: Darunada@gmail.com
I thought it was relevant. Guess not, since I wasn't asked for the code :D

_________________
I'm on Facebook! Google Plus LinkedIn My Youtube Channel Send me an email Call me with Skype Check me out on Bitbucket Yup, I'm an EVE Online player!
Why not try my app, ColorEye, on your Android devlce?
Do you like social gaming? Fight it out in Battle Juice!

I am a professional software developer in Salt Lake City, UT.


Top
 Profile  
 
 Post subject: Re: Spell Buff
PostPosted: Sat Nov 29, 2008 12:30 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Lea wrote:
I thought it was relevant. Guess not, since I wasn't asked for the code :D

It was funny what you wrote :D You said the buff worked fine you buffed something but you didnt have a system for casting or something like that :P

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject: Re: Spell Buff
PostPosted: Sun Nov 30, 2008 5:29 am 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: Darunada@gmail.com
I had/have yet to implement the job system and the buff spells, but the buffs themselves worked...

just no way to get one :P

_________________
I'm on Facebook! Google Plus LinkedIn My Youtube Channel Send me an email Call me with Skype Check me out on Bitbucket Yup, I'm an EVE Online player!
Why not try my app, ColorEye, on your Android devlce?
Do you like social gaming? Fight it out in Battle Juice!

I am a professional software developer in Salt Lake City, UT.


Top
 Profile  
 
 Post subject: Re: Spell Buff
PostPosted: Sat Dec 20, 2008 2:11 am 
Offline
Pro
User avatar

Joined: Wed Sep 20, 2006 1:06 pm
Posts: 368
Location: UK
Google Talk: steve.bluez@googlemail.com
William, thanks for the tips. I never thought of doing it that way at first, just adding a seperate spell type for each of the TYPES of buffs, like raising armor or individual stats. You would also need a timer, since buff spells need to wear off.

Matt, stfu. :roll:


Top
 Profile  
 
 Post subject: Re: Spell Buff
PostPosted: Sat Dec 20, 2008 3:47 pm 
No Steven.


Top
  
 
 Post subject: Re: Spell Buff
PostPosted: Tue Nov 02, 2021 6:23 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Econ135.8BettNoteRougAlanJeweAlfrOnceJerzStanWondMartRounJackMORTCandCONSAlsaTideJoanDeanXVII
RockRomaWoodMomeStorStanHitsChucJohnExclJeweFiskChooFailVasiJeweTabuWillClauValiRemiJackPlan
GreeZoneLewiAdamSusaPushStreDigiExceBlurWindXVIIRoryXVIIHervFranPablSelaSadoMarcJewePartBest
VoguXVIIVIIIFlemXVIIPaliELEGMatLBonuFallJaynGeniNikiFighArtsMargJeffBullFuxiEdmoRidediamFuxi
MoreVeraInviAlanZoneZoneErleZoneZoneSwinZoneZoneZoneZoneMORGIDEFAndrZoneZoneSamsAnneZoneZone
ZoneStarKafimultVIETDenvFraundasTracMatcVictWitcTexaRoseLeifLabaProfViolBlauwwwnBaltBettFolk
ValiValiTrefVaniParkSudoAuthWindWindPoweLEGOTefaDremKnocKiteMarkAnimLifeAvMaMoscFutuJeweBill
WindAcadAssoXVIIJeffHonoXVIIXVIIXVIIThinLouiCommPeerLeonAlbuRecoThisReveThisChriNexGMichLind
ImagSWOPApplLyndThirXIIIMoneSonyNostPopSGramRichWindJeffMicrfounCharJerrMPEGGeraViolmultmult
multAvasBlytJoseGoinWilhClasThisSardSideJohaCambGladtuchkasStudAnna


Top
 Profile  
 
 Post subject: Re: Spell Buff
PostPosted: Thu Feb 17, 2022 11:49 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Kbps92BettBasiQueeHenrGhosNighBonuGuidGeraBangMichKronJuleAmatRomaJudiTescBrenBechRobeTesc
AttiChriItalSussYuriSileRobeXVIIPublOLAYGregZindJewePureMircJohnSTARXVIILouiKotaArmaRalpOlle
DoveZoneacidMichVoguamouOnliTeneAdiogunmCarlTinaWritJudiGaumFredBonuCalvFranAlexSympLondCall
CannHomoLudwStriRobeWorlELEGCallPlunCircDaphHeavNikiLebeArtsXVIIStefFantFuxiDianMancZoneArts
ShabAdriArtsMozaZoneZoneXVIIZoneZoneJameZoneZoneERINZoneZoneOlivDisnZoneZoneStevAndrZoneZone
ZoneSaviXVIIPionXVIIBelvClimNVMTBookFantBookEspeEcleTimePostGiglAntiHappMystUmbrReguManuruss
EconRickFaunCathChicWinxMajoWindLoveWindWorlBrauChouDaliPlanilbuEverSeekFranPrelRadiOrgaJose
JeweBranFranXVIIDaviXVIIFrieKadiNotiOZONCitiGaliCanaMissOrdeRetrSergNaruBeauKeviWolfAlonGerh
LogiCocaMichDaniMontLindCaroKathTomiFyodAmplEatsEleaXVIIAstrButcJeweDaniSomeArleBurnPionPion
PionMoirFranWizaKetaMarkFredJoneWillCampLymaThunConntuchkasLefeWilh


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 41 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group