Official Community Forums
HomeHome  FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  Log in  The Wiki  Website  github Project  

Share | 

 FPS-style Combat

Go down 

Posts : 306
Join date : 2011-08-03
Location : Liverpool, UK

PostSubject: FPS-style Combat   Thu 3 Nov - 9:27

Hi guys,

Been looking at some of the past projects, and I was thinking about the current capabilities of Multiverse.
Is it possible to program a combat system that isn't point and click, but a normal shooter? I know a lot of games go with the normal RPG-style click to target, but I'm coming up with a few concepts that intend to break free from the usual MMO game. (Word of Warcraft etc).
Of course, I appreciate that any game could be programmed to be a shooter, but what about the Multiverse platform? Has anyone tried anything like this before?

Any ideas?

Back to top Go down
Head of Platform Development

Posts : 424
Join date : 2011-08-03

PostSubject: Re: FPS-style Combat   Fri 4 Nov - 0:15

I think that mwright was working on a mech shooter mmo - Dark Horizons but I don't know how far he got. The main difficulty that I can think of would be determining where on the body a player hit. But if you had all of the bodies the same you could probably hard code the numbers in. I know that currently in mv you can cast a ray to see what intersects with that ray then you could take the position and orientation of the world object and determine where on the body the shot hit.
Back to top Go down

Posts : 306
Join date : 2011-08-03
Location : Liverpool, UK

PostSubject: Re: FPS-style Combat   Fri 11 Nov - 9:01

I've been looking at the whole ranged attack thing, and checked out a few posts on the Old Forums.

This is what I came across, but I've run into a problem.

The first bit says

Quote :

Step 1: Add a range property to a weapon template in the file.
How exactly would I go about doing that?
I see there are various stats and rules for each template, but do I just add another entry somewhere at the bottom of that template? Or would it involve some alterations of other files?

Also, in the file, I couldn't find any entries for Human Male. Just Female - is that normal?

Any help would be great!

Back to top Go down
Head of Platform Development

Posts : 424
Join date : 2011-08-03

PostSubject: Re: FPS-style Combat   Fri 11 Nov - 13:36

I dont know about the Human Male...I believe the questmaster was male but I havent used the default in years so I dont recall what exactly is included.

For the range attack I am not sure where the best place to put the range would be but you could put it as a property in the actual item ( or you could have it as a property of the ability something like pistol fire (

If you are going to have each weapon have its own range then I would probably put in
So you would create an item like (This is untested just an example)

        #Indicates where the item attaches to the 3D model
        #Indicates the name of the type
        equipInfo = MarsEquipInfo("weapon")
        #Indicates the slot that it uses (will remove anything with the same slot that is already equiped)
        #Rifle display mesh (3D model)
        dc = DisplayContext("rifle.mesh")
        #What slot to attach the object when in combat
        dc.setAttachInfo(DisplayState.IN_COMBAT, MarsEquipSlot.PRIMARYWEAPON, MarsAttachSocket.PRIMARYWEAPON)
        #What slot to attach the object out of combat
        dc.setAttachInfo(DisplayState.NON_COMBAT, MarsEquipSlot.PRIMARYWEAPON, MarsAttachSocket.PRIMARYWEAPON)
        dcMap = DCMap()
        #Indicates what meshes it can be attached to
        dcMap.add(human_female_base_DC, dc)
        #Rifle template
        tmpl = Template("Rifle")
        #Inventory Icon
        tmpl.put(InventoryClient.ITEM_NAMESPACE, InventoryClient.TEMPL_ICON,
        #Action when click on rifle in inventory
        tmpl.put(InventoryClient.ITEM_NAMESPACE, InventoryClient.TEMPL_ACTIVATE_HOOK, EquipActivateHook())
        #Attaches the previously defined equipInfo
        tmpl.put(InventoryClient.ITEM_NAMESPACE, InventoryClient.TEMPL_EQUIP_INFO, equipInfo)
        #Attaches the previously defined display map
        tmpl.put(InventoryClient.ITEM_NAMESPACE, InventoryClient.TEMPL_DCMAP, dcMap)
        #Indicates the range of the item
        tmpl.put(CombatClient.NAMESPACE, "range", 10000)
        #Registers the template with the ObjectManager

You could either use CombatClient.NAMESPACE or InventoryClient.ITEM_NAMESPACE but since you are planning on using it in combat I would probably go with CombatClient

You will also probably need to make a special ability to go with your rifle something like rifle shoot which will determine if the player has equiped the rifle and the pull the range from the item. You should also make your own version of EffectAbility that will be called whenever they use the rifle (Probably just inherit all of the properties of EffectAbility but override the range to pull from the equipped item) That way you could also apply other effects to the range like have the range increase if the player has higher Perception

Back to top Go down
Head of Platform Development

Posts : 424
Join date : 2011-08-03

PostSubject: Re: FPS-style Combat   Fri 11 Nov - 14:00

I think the first thing you might want to do is figure out what things will affect the shooting ability so that you can figure out how you want to architect it.
It might be easiest to have everything stored on the character and to have each weapon modify the characters attributes
So have a range attribute on the character and then if the player equips a rifle one of the things it does is increase the characters shooting range by a set amount that way you could have other objects modify the property directly when used/equipped rather than trying to run through the list of modifications to the property. For example take a look at the armor ability they made:
ability = EffectAbility("armor")
ability.setActivationEffect(Mars.EffectManager.get("armor effect"))
ability.addCooldown(Cooldown("GLOBAL", 1500))
Mars.AbilityManager.register(ability.getName(), ability)

And the effect they made
effect = StatEffect("armor effect")
effect.setStat("armor", 20)
Mars.EffectManager.register(effect.getName(), effect)

Here there is an ability (armor) that cost 30 mana to activate and raises the players armor stat by 20 for 15 seconds (15000 ms) once the time runs out the effect is removed
It also restricts the effect to only being usable on yourself.

You could easily do something similar for the rifle.
Back to top Go down
Sponsored content

PostSubject: Re: FPS-style Combat   

Back to top Go down
FPS-style Combat
Back to top 
Page 1 of 1
 Similar topics
» Iron Man 3 Credit Card style USB
» kok replay sharing
» Right now do you think you have a healthy life style or .. ?
» Artifacters.
» TMNT NECA series with wrong head, rare?

Permissions in this forum:You cannot reply to topics in this forum
 :: Development :: Client Scripting and Development-
Jump to: