Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-15-2016, 09:38 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 117,635
Abronsyth is on a distinguished road
Default NPC Battles?

OK, so I have this idea for NPC battles that'd actually be fairly simple to pull off, but could be made to look cool, haha.

On my site I am adding stats. For this post I'm going to use "magic" as the default stat for the sake of example.

So all pets on my site have Magic ranging from 1 to 100. Now I want to create a set of NPCs who will be randomly generated (I already can do this so this part isn't important), and they'll have their own stats. So say I am going to battle, and I have a cat who has 50 Magic. The random-NPC, we'll call him Angry Cat, has 55 magic. Because Angry Cat has higher stat(s), he wins the battle if I choose to use Magic. However, let's say my cat has 60 Intelligence, and Angry Cat only has 30 Intelligence. So I choose to have my cat attack using intelligence (don't question it), and may cat wins.

Now here are the issues I'm running into:
A) selecting the cat I want to use to battle
>>>>I'm think that this is where the spotlight pet could come in handy. The pet you select as your spotlight could be the one who does the NPC battling. However, I need then to know how to select the pet the user has selected as their spotlight adoptable, and get that pet's stats.

B) choosing the attack
>>>>However, I think I can use if($mysidia->input->post("submit")) (but change "submit") to select the attack? Say I have each attack as buttons:
[Spell Cast] [Trick] [Tackle]
They push "Spell Cast" which will be known action-wise as "spell". Then we do if($mysidia->input->post("spell")) and then just select the adoptable's magic, and the NPC's magic within that. So this might not actually be a problem.

So it's not the fanciest of systems, but once I get everything figured out I should be able to do a lot more with it. I'd probably be able to incorporate health that decreases with each blow, giving more powerful NPCs the edge by making it so if their stat is in a certain interval then the damage they deal has a chance of hitting harder.

Of course as soon as I get it all set up I'll release it to the community as a mod :)

If anyone has suggestions/advice that'd be super awesome!
-Abron
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 10:52 PM.

Currently Active Users: 886 (0 members and 886 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636