sorcerer's summons

Wrote new code? Fixed a bug? Want to discuss technical stuff? Feel free to post it here.

Moderator: Moderators

uPantcho
Human
Human
Posts: 42
Joined: 05 Nov 2009, 05:25
Noob?: Yes

sorcerer's summons

#1 Post by uPantcho »

i did a almost-good implementation of sorcerer summons on my openkore and i'll post it here

http://upantcho.com/summon.patch

i tried to put similar to homunculus/mercenarys but there are some major differences between then so is not exactly the same

i know somethings can be better polished like:

Code: Select all

 		} elsif (UNIVERSAL::isa($actor, "Actor::Slave")) {
 			$slavesList->add($actor);
+			 if (defined $char->{summon} && ($char->{summon}{ID} == $args->{ID}) && !defined $char->{summon}{name}) {#set global name of summon
+				$char->{summon}{name} = $jobs_lut{$args->{type}};
+			}
 		}
but maybe someone who already knows the way can just put it on a better place... i didnt find a better way


anyway, here is an example of config using this patch:

Code: Select all

useSelf_skill El Control {
	lvl 2
	summon 1
	summon_sp > 200
	summon_type Ventus 3
	whenNotGround Unknown 239 #this is like a pneuma, my tables must be outdated
	whenStatusInactive El ControlDelay
	monsters Penomena
}

useSelf_skill El Cure {
	summon 1
	summon_hp < 40%
	hp > 80%
	timeout 1
}
summon 1|0 if you need a summon or not
summon_sp and summon_hp are same as always
summon_type = one of the types at globals.pm (i used agni, aqua, ventus and tera 1/2/3 but im not sure if these names are correct)

the command "sll" now list summons as slaves and the new command "summon" was added to show the summon's status


PS: i had to redo somethings (dont know why the first patchs were crashing openkore). this looks ok on a updated svn
EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: sorcerer's summons

#2 Post by EternalHarvest »

What's "undef $subcmd;" in Commands for? If there are no subcommands, won't it work without that anyway?

Code: Select all

+		if ($char->{summon}{ID} == $ID) {
+			delete $char->{summon};
+		}
Either homun&merc need that too; or leave everything as is to always have information about these actors (you can resummon it, right?)

Code: Select all

+			 if (defined $char->{summon} && ($char->{summon}{ID} == $args->{ID}) && !defined $char->{summon}{name}) {#set global name of summon
+				$char->{summon}{name} = $jobs_lut{$args->{type}};
+			}
Use $char->{summon}->setName(). They aren't renameable?

What about AI? They can move, attack etc? Is that controlled from the client?
uPantcho
Human
Human
Posts: 42
Joined: 05 Nov 2009, 05:25
Noob?: Yes

Re: sorcerer's summons

#3 Post by uPantcho »

EternalHarvest wrote:What's "undef $subcmd;" in Commands for? If there are no subcommands, won't it work without that anyway?

Either homun&merc need that too; or leave everything as is to always have information about these actors (you can resummon it, right?)



Use $char->{summon}->setName(). They aren't renameable?

What about AI? They can move, attack etc? Is that controlled from the client?
since is using the same sub as the other slaves, that is just to avoid a "summon s" which will display the first "if" message

there is one difference, i couldnt take the summon off my screen. if that happens because im lagged i dont know, but is really easy to get off screen with homunc and mercenary

an elemental is more like an mercenary than a homunculus. his stats are made at the time you summon (the flee usually equals the player flee. max HP = 1/3 player max HP and so on). the same summon can have as many stats as equips and buffs for a player. thats why when they get offscreen i removed everything


on bro they are not renameable. also, there is no AI for them, the server controls moviments, attacks (on some modes they dont attack at all), skills (some random skills). the only thing that the player can do is use El Control to force the summon to activate some skills. I dont know how the skill El Action works at all (maybe is a target skill?) because i dont have any char with it. obs: El Action "forces" the summon to use an offensive skill
EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: sorcerer's summons

#4 Post by EternalHarvest »

uPantcho wrote:since is using the same sub as the other slaves, that is just to avoid a "summon s" which will display the first "if" message
Maybe it's better to integrate with the first "if" then. Homun and merc both use it already.
on bro they are not renameable. also, there is no AI for them
Ok.

Otherwise, looks fine.
uPantcho
Human
Human
Posts: 42
Joined: 05 Nov 2009, 05:25
Noob?: Yes

Re: sorcerer's summons

#5 Post by uPantcho »

EternalHarvest wrote: Maybe it's better to integrate with the first "if" then. Homun and merc both use it already.
for summons the only stats that you need to see are: his class, hp and sp while the homunc and mercenary stats has a lot more information
EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: sorcerer's summons

#6 Post by EternalHarvest »

uPantcho wrote:for summons the only stats that you need to see are: his class, hp and sp while the homunc and mercenary stats has a lot more information
What I don't need to see?
uPantcho
Human
Human
Posts: 42
Joined: 05 Nov 2009, 05:25
Noob?: Yes

Re: sorcerer's summons

#7 Post by uPantcho »

well, the problem is how to get that information. you cant get from the server like homunculus and mercenary


the only way would be at the time of the summon store things like the char atk, flee, etc and even that would fail if, for instance, the summon was active before the login.
EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: sorcerer's summons

#8 Post by EternalHarvest »

I mean, there is no other information at all? For homunculi and mercenaries, you don't "get" anything from server - it sends all the information at once by itself.
uPantcho
Human
Human
Posts: 42
Joined: 05 Nov 2009, 05:25
Noob?: Yes

Re: sorcerer's summons

#9 Post by uPantcho »

http://pastebin.com/GHwmQirH

i have excluded the 081E packets but they are almost the same as the 080E, here is an example

Code: Select all

  0>  1E 08 05 00 33 2A 00 00                               ....3*..

  0>  0E 08 7E 5D 00 00 33 2A    00 00 33 2A 00 00          ..~...3*..3*..
so... there is no stats info '-'

besides the 081E i only excluded 007F and 0187 packets
uPantcho
Human
Human
Posts: 42
Joined: 05 Nov 2009, 05:25
Noob?: Yes

Re: sorcerer's summons

#10 Post by uPantcho »

i made a new patch. removed some ugly code from commands.pm and the use of $char->{summon}->setName()

also, some subs were moved to network/receive.pm

here is the link:

http://upantcho.com/summon1245.patch