Assign attacks

Talk about Severance Blade of Darkness modifications and maps here. No tips or tech support questions please, use the forum above. Note that the game is rated 18 so some content may be unsuitable for younger readers.

Moderators: Ade, prospero

User avatar
IrateGiant
Dragon
Posts: 328
Joined: Fri Jan 08, 2010 12:35 pm
Location: Spain
Contact:

Postby IrateGiant » Wed Oct 26, 2011 3:12 pm

Thanks pro! [:D]

I´m testing your code from NewOrcCity and Wizard´s Domain in my mod but not using the NewStuff method. First I´m testing with the modified original characters like ChaosKnight, with original combos, but I have some problems: [:I]

1)I don´t know how create combos, for example like original Barbarian "Chaosword combo" in "ChkCombos.py" Example: (A+F)+(B)

2)What function I need import to see the magic effect of energy ball of "Chk"? and "FireBalls" for example?

3)I have a problem with attack assignation; I assign the "A" key to a attack animation but the game not recognise this. I´m try to see if the "BAct.py" and "AnimationSet.py" don´t have animationsset but yes. Any solution?

4)Testing my mod a message appears in the console "Error Creating frame of class MenuWidget.B_MenuTree" [xx(] How can I solve this?

Thanks!!

User avatar
prospero
Ancient Dragon
Posts: 1728
Joined: Wed Nov 21, 2001 1:42 am
Location: United Kingdom

Postby prospero » Thu Oct 27, 2011 11:28 am

[8)] Probably quicker for me to make a mod than explain it. It's quite complicated. [:p]

Magic attacks are triggered by functions in the data class that are in turn linked to animation events.

User avatar
IrateGiant
Dragon
Posts: 328
Joined: Fri Jan 08, 2010 12:35 pm
Location: Spain
Contact:

Postby IrateGiant » Thu Oct 27, 2011 7:20 pm

OKOK xD Thanks pro!

I´ve a code question: [:I]

Using your Wizard´s code I´m trying to use your method to select "Wizard´s Skins" but replacing the skin by other original models like "Barbarina_N", "ChaosKnight", etc [:D]

For example from "Wizards Domain" "pj.py":

Code: Select all

char=Bladex.CreateEntity("Player1","Wizard_A",initpos[0],initpos[1],initpos[2], "Person") standin=Bladex.CreateEntity("ActorMasklin","Wizard_A",-3841, -1069, -11508, "Person") standin.Angle=0.0 if SkinName=="SkinB": char.<font color="green">Bladex.CreateEntity("Player1","ChaosKnight",initpos[0],initpos[1],initpos[2], "Person")</font id="green"> standin.<font color="green">Bladex.CreateEntity("ActorMasklin","ChaosKnight",-3841, -1069, -11508, "Person")</font id="green"> standin.Angle=0.0 elif SkinName=="SkinC": char.<font color="green">Bladex.CreateEntity("Player1","Barbarian_N",initpos[0],initpos[1],initpos[2], "Person")</font id="green"> standin.<font color="green">Bladex.CreateEntity("ActorMasklin","Barbarian_N",-3841, -1069, -11508, "Person")</font id="green"> standin.Angle=0.0

...etc

This method not is correct but something similar is my idea. [:I][:D]

How can I do this? Thanks!

User avatar
prospero
Ancient Dragon
Posts: 1728
Joined: Wed Nov 21, 2001 1:42 am
Location: United Kingdom

Postby prospero » Fri Oct 28, 2011 2:28 am

That method allows skin selection by the menu screen.

Can't remember how I did it now, Menu stuff is quite tricky. But if you look though the Wizard Menu file you should be able to adapt it.


* The standin guy just appears on the opening screen. You don't need him. It's the same way it's done in the Player selection map.

As a matter of interest (or not), the actual "Player1" in that map is a spider. Not controlable of course.[:p]. But if you use a cheat to go to another map while this map is loaded, the Player becomes a spider and you can walk (scuttle) around. But as soon as you try to Use something the game will crash. [B)]

User avatar
prospero
Ancient Dragon
Posts: 1728
Joined: Wed Nov 21, 2001 1:42 am
Location: United Kingdom

Postby prospero » Mon Oct 31, 2011 12:24 pm

I've got a Chaos Knight working as a Player. At the moment all he can do is stomp around. I haven't enabled his attacks yet, so I don't know how well he will work in combat.

I need to borrow some animations from other chars to make him fully workable. He has no strafe animations of his own, but he may fight OK without them.

User avatar
IrateGiant
Dragon
Posts: 328
Joined: Fri Jan 08, 2010 12:35 pm
Location: Spain
Contact:

Postby IrateGiant » Mon Oct 31, 2011 12:53 pm

Hi pro! I have all enemies characters playable right now but I need to fix some attack and combos like launch energy balls of ChaosKnight, spit fire balls of GreatDemon, Salamander and LittleDemon, the "teleporter fuction" of Vamp (appears back enemy) and "dissapearance dodges movement" of LittleDemon, dodges attacks of Ragnar and DalGurak and fix the problem with attacks of Spidersmall. [:)]

I want to create a "BeastMode" like GeoW3 [:D] with only the original movements of enemies. [:)] My idea is create a system of selection like "select skins" of Wizard´s Domain [:)] but with the respectives enemies icons. All this with a score system, killing enemies like "Traidor_Knight´s" and fight the original heroes. And trying to add "Sword War Heroes".

I need many time to finish this idea, I´m trying to adapt the Wizard´s Domain Menu with NewOrcCity SelectionMenu. [xx(][:I]

User avatar
prospero
Ancient Dragon
Posts: 1728
Joined: Wed Nov 21, 2001 1:42 am
Location: United Kingdom

Postby prospero » Tue Nov 01, 2011 4:55 am

Got one attack working.[8D]

I tend to think he will be better with his basic moves rather than making him more agile. There is no run anims, so he only moves at one speed. But that's in keeping with the nature of the guy. Same with attacks. He is like a tank. Powerful, but not a great deal of finesse.
A flamethrower attack would be good.[:p]

The launch balls attack is probably the easiest thing to get working. But it really needs some refinements in the tageting methods:

If enemy selected, balls targets that.

If no enemy, a scan system is needed to locate nearby visible enemies. That way you can bring down archers on high walls.

If no enemies at all, target a set point in front.

It would be nice to develop the ball attack to include different types of projectile. Not too difficult.

His weapons are somewhat limited. Basically all he needs is his "Espadon" and maybe a big hammer. The code needs to be tweaked so he can use other weapons. I did some nice big hammer models for CK-based enemies in ProsperoArena1. I need to put in some code to adjust his weapon damage as he levels up. The Espadon at it's default power is to big for him at level 1.

User avatar
prospero
Ancient Dragon
Posts: 1728
Joined: Wed Nov 21, 2001 1:42 am
Location: United Kingdom

Postby prospero » Thu Nov 03, 2011 11:57 am

Done a bit more to him. [8D]

He can strafe while locked onto an enemy now. Also got 4 attacks working.

Fixed his step sounds. I haven't kept the quake effect, because that is tends to mak your eyes go funny after a while.[B)]

Got a great flamethrower attack working. You can do it continously. Bt it needs something to limit it's use, like a fuel level so you have to look for gas cans to drink to top it up.

Got probs with sheathing weapons, but I'll sort that eventually.

User avatar
prospero
Ancient Dragon
Posts: 1728
Joined: Wed Nov 21, 2001 1:42 am
Location: United Kingdom

Postby prospero » Fri Nov 04, 2011 3:45 am

Fixed the sheathe weapons thing. His native weapons Espadon and Escudon don't seem to have back anchors, so have to try and make new versions.

Got him to run using a cloned version of the walk anim speeded up slightly for running. It's a slightly quicker walk really.

Flame thrower works great! [8D]

Made it so he never loses energy in an attack. As he has a limited mumber of attacks and is rather clumsy, I thought he needed an advantage. [:)]

Got to add all the "take" animations. Also see if I can get him to climb/jump.

Quite good fun so far. He knocks the cr*p out of Traitor Knights.[:D]

User avatar
IrateGiant
Dragon
Posts: 328
Joined: Fri Jan 08, 2010 12:35 pm
Location: Spain
Contact:

Postby IrateGiant » Fri Nov 04, 2011 8:50 am

Sound great pro! [8D]

The ChaosKnight must be as a unstoppable tank! [:D]

User avatar
IrateGiant
Dragon
Posts: 328
Joined: Fri Jan 08, 2010 12:35 pm
Location: Spain
Contact:

Postby IrateGiant » Wed Nov 16, 2011 12:22 pm

Hi guys, I create a selection menu ingame to load diferent maps since a little one, but this load maps are the originals Barb_M1, Dwarf_M3, etc. That I need to modify in code to load new ones creates by myself? I´m studying many files in many maps and mods but I don´t understand how to do. [xx(]

I think that I need to install the new maps independiently of the mod and then load the maps with #execfile("...\...\Maps\.lvl")#

But maybe we can do this more easy, with "Installnewstuff.py" adapting code: "Adst= ('../../Anm')" to "Mdst= ('../../Maps')"?

<font color="green">

Code: Select all

Mdst= ('../../Maps') MapsFiles=os.listdir('../../BODLoader/Mods/WizardsDomain/ToMaps') for file in AnmFiles: newfile = os.path.basename (file) Msrc= ('../../BODLoader/Mods/WizardsDomain/ToMaps/'+newfile) if os.path.exists('../../Maps/'+newfile): #print "Exists file: ",newfile # if file already exists in dest dir, check for for mod time if getmtime('../../Maps/'+newfile) < getmtime(Msrc): shutil.copy(Msrc,Mdst) print "overwriting : ",newfile else: print "NOT exists: ",newfile #if file does not already exist at dest dir, copy it straight to dest dir shutil.copy(Msrc,Mdst) print "copying: ",newfile
</font id="green">

Furthemore I´m trying to asign a object to a selection of a character and this to the new map. Example:

Push "AdoquinPulsador" --> load "NewMap.lvl" --> select "Barbarian_N"

Push "AdoquinPulsador2" --> load the same "NewMap.lvl" --> select "Dwarf_N" (This selection change pj.py)*

Push "AdoquinPulsador3" --> load the same "NewMap.lvl" --> select "Amazon_N" (This selection change pj.py)*

etc.

Any idea about how to do this? Sorry my english. [:I]

User avatar
Tomash
Dragon
Posts: 246
Joined: Sat Oct 25, 2008 11:23 am
Location: Russia
Contact:

Postby Tomash » Wed Nov 16, 2011 1:22 pm

Bladex.LoadLevel(string Name of Map's folder)

for example

Bladex.LoadLevel('Barb_M1')
Bladex.LoadLevel('DDM')

The map's folder must be placed in "directory of the game/Maps" folder

User avatar
Tomash
Dragon
Posts: 246
Joined: Sat Oct 25, 2008 11:23 am
Location: Russia
Contact:

Postby Tomash » Wed Nov 16, 2011 1:27 pm

You can create the map's folder and fill it with files via standard tools of BLModInfo. You don't need to use this "InstallNewStuff" method.

User avatar
Tomash
Dragon
Posts: 246
Joined: Sat Oct 25, 2008 11:23 am
Location: Russia
Contact:

Postby Tomash » Wed Nov 16, 2011 1:47 pm

About to reload the map with new race of char.

You can use a special configuration file instead to change pj.py

For example

# In your "Push the block" script

cfgfile = open("../../Config/NewMap.cfg", "w")
cfgfile.write("PlayerKind = 'Dwarf_N' ")
cfgfile.close()

Bladex.LoadLevel('NewMap')

# In your pj.py

PlayerKind='Knight_N'

try: execfile("../../Config/NewMap.cfg")
except: pass

char=Bladex.CreateEntity('Player1', PlayerKind, ...

User avatar
prospero
Ancient Dragon
Posts: 1728
Joined: Wed Nov 21, 2001 1:42 am
Location: United Kingdom

Postby prospero » Wed Nov 16, 2011 2:28 pm

Hi IG

This is the exit function from the Wiazard map:

Code: Select all

def Exit(): global NextMap if NextMap=="": Bladex.LoadLevel("Casa") print "Loading Casa map" return import os import WizGotoMapVars # check follow-on maps are actually installed..... if NextMap=="1": if not os.path.exists ("../../Maps/RuinsWiz/Cfg.py"): Bladex.LoadLevel("Casa") else: WizGotoMapVars.EndOfLevel("RuinsWiz") elif NextMap=="2": if not os.path.exists ("../../Maps/DwarfWiz/Cfg.py"): Bladex.LoadLevel("Casa") else: WizGotoMapVars.EndOfLevel("DwarfWiz") elif NextMap=="3": if not os.path.exists ("../../Maps/BarbWiz/Cfg.py"): Bladex.LoadLevel("Casa") else: WizGotoMapVars.EndOfLevel("BarbWiz") elif NextMap=="4": if not os.path.exists ("../../Maps/KnightWiz/Cfg.py"): Bladex.LoadLevel("Casa") else: WizGotoMapVars.EndOfLevel("KnightWiz") else: Bladex.LoadLevel("Casa") print "No Next Map Selected"
This is triggered by entering one of the four arches in the little temple at the end. Each arch has a trigger sector that selects the next map and assigns the map name to the var NextMap. You 'use' the tablet that will magically appear to close the map and load the next one.
you can use any method you like to trigger a function like this.

Note the clause that checks whether or not the next map is actually installed.

You can install any map with the BODLoader, but leave out the front menu so you can only start them though leaving another map.

WizGotoMapVars.py is a version of GotoMapVars.py customised for the Wizard because he has extra information that needs to be carried with him. For standard RAS Players, use GotoMapVars.

Note the falsafe clauses that laod the 'Casa' map. This just takes you to the menu screen.

btw. If you try this in the Wiz map you won't go anywhere new as only I have the folow-on maps which I'm working on. (among other things....[:)])


Return to “Severance BoD: Modding Community”

Who is online

Users browsing this forum: No registered users and 2 guests

cron