[TQ Binaries] Discussion and documentation

01/15/2012 01:44 Korvacs#31
Quote:
Originally Posted by Kiyono View Post
I noticed that Exodus had it right before you posted, also found master15's CoEmuv2 guide on this and I apparently already had the RedemptionCO source but it never even occurred to me that it might have TQ's npc system, lol Not sure what PMCO is? Link?

It could be me but 2031 doesn't have subtypes?
[Only registered and activated users can see links. Click Here To Register...]
But since you say so, it's either the unknown or the npc_mode.

//edit For some reason, RedemptionCO's system and Exodus use exactly the same structs (ActionStruct/TaskStruct even the spaces are in the same place) so that either means that Exodus' system is based on this or vice versa but since RedemptionCO's implementation was flawed (what was wrong with it again?) Exodus' version should be flawed too.
The wiki isnt always correct sadly, somethings may be missing.

Essentially the action system should be treated as a series of If statements where by you progress by these statements being true/false through a tree.

That system doesnt do this correctly under a few circumstances which means that its entirely flawed, which results in a number of npcs having to be done manually (ie. not using the actionhandler at all for anything). As a result that means that the action system is being massively under utilised (something like 3% of the total number of actiontypes are handled). So thats basically whats wrong with it.
01/15/2012 04:24 lostsolder05#32
Quote:
Originally Posted by Kiyono View Post
//edit For some reason, RedemptionCO's system and Exodus use exactly the same structs (ActionStruct/TaskStruct even the spaces are in the same place) so that either means that Exodus' system is based on this or vice versa but since RedemptionCO's implementation was flawed (what was wrong with it again?) Exodus' version should be flawed too.
Part of it was based off ImmuneOnes implementation I had just taken it a lot further then he did.

Quote:
Originally Posted by Korvacs View Post
The wiki isnt always correct sadly, somethings may be missing.

Essentially the action system should be treated as a series of If statements where by you progress by these statements being true/false through a tree.

That system doesnt do this correctly under a few circumstances which means that its entirely flawed, which results in a number of npcs having to be done manually (ie. not using the actionhandler at all for anything). As a result that means that the action system is being massively under utilised (something like 3% of the total number of actiontypes are handled). So thats basically whats wrong with it.
TQs NPC implementation was of the last things I was working on, so yeah it's not nearly near complete(however it is the furthest public implementation I've personally seen). But, that's why I had C# dialogs still in there.
01/15/2012 10:40 Kiyono#33
Quote:
Originally Posted by Korvacs View Post
The wiki isnt always correct sadly, somethings may be missing.

Essentially the action system should be treated as a series of If statements where by you progress by these statements being true/false through a tree.

That system doesnt do this correctly under a few circumstances which means that its entirely flawed, which results in a number of npcs having to be done manually (ie. not using the actionhandler at all for anything). As a result that means that the action system is being massively under utilised (something like 3% of the total number of actiontypes are handled). So thats basically whats wrong with it.
I see, then do you also happen to know under which circumstances these flaws become noticeable? Depending on how much I care about those circumstances I might just implement RedemptionCO's system since I'm not striving for a perfect system.
01/15/2012 10:59 Korvacs#34
Quote:
Originally Posted by Kiyono View Post
I see, then do you also happen to know under which circumstances these flaws become noticeable? Depending on how much I care about those circumstances I might just implement RedemptionCO's system since I'm not striving for a perfect system.
Well, if you look at the system and see how many npcs are handled separately, then you can probably work out that its pretty often.
01/15/2012 11:12 Kiyono#35
Well it's not that many, 11 NPCs + the warehouses, far from what I call many seeing the amount of NPCs there are and it seems that the only reason those are done in the source is because it's missing some handled action types unless I'm missing something of course. If that's all then I can just handle the action types (ok, it probably won't be that simple.) and make it work.
01/15/2012 11:26 Korvacs#36
The system has a flawed way of determining if it should use the NextID for the next action or the FailedID, so as a result some basic stuff works, but the rest of it doesnt, so saying "I can just handle the action types" is definitely not true in this case.
01/15/2012 11:40 Kiyono#37
Haven't looked that far yet. I'm going through the code while implementing it so I'll encounter it at some point and I'll think about it when it happens.
//edit Well I didn't exactly come far, server crashes when the npc option is something that is not 255.
//edit It probably has to do with how I did this:
I don't know how to use pointers >_>
01/15/2012 21:16 CptSky#38
Quote:
Originally Posted by Kiyono View Post
I don't know how to use pointers >_>
So, don't use them?
01/15/2012 21:37 Kiyono#39
From now on I won't.
01/19/2012 01:19 Spirited#40
Quote:
Originally Posted by CptSky View Post
So, don't use them?
Some people are terrified by pointers.
It still puzzles me (since to be considered as a basic programmer, you need to know pointers inside and out).
01/19/2012 08:37 I don't have a username#41
Pointers are nothing hard, once you understand how they work.

Code:
ushort SomeValue = *(ushort*)(pointer + 10);
Meaning:
Code:
VALUE = USHORT VALUE OF (POINTER + OFFSET)
And same the other way around.
Code:
*(ushort*)(pointer + 10) = SomeValue;
Meaning:
Code:
USHORT VALUE OF (POINTER + OFFSET) = VALUE
Whatever.
Code:
int somevalue = 10;//declaring a variable
int* somepointer = &somevalue;//declaring a pointer of somevalue's address
int address = (int)somepointer;//Getting the address of somepointer
int value = *somepointer;//Getting the value of somepointer
01/19/2012 10:00 Korvacs#42
Can anyone help me with this?

[Only registered and activated users can see links. Click Here To Register...]

I figured i would ask in the EO section since its the EO source im looking at but it was a pointless exercise....
01/19/2012 16:15 nTL3fTy#43
Quote:
Originally Posted by Korvacs View Post
Can anyone help me with this?

[Only registered and activated users can see links. Click Here To Register...]

I figured i would ask in the EO section since its the EO source im looking at but it was a pointless exercise....
It's labeled that in EO, but it's something different in CO.
Code:
enum ENUM_MAPTYPE {
    MAPTYPE_NORMAL		= 0x0000,    // 00
    MAPTYPE_PKFIELD		= 0x0001,    // 01
    MAPTYPE_CHGMAP_DISABLE	= 0x0002,    // 02                    // magic call team member
    MAPTYPE_RECORD_DISABLE	= 0x0004,    // 04
    MAPTYPE_PK_DISABLE		= 0x0008,    // 08
    MAPTYPE_BOOTH_ENABLE	= 0x0010,    // 16 
    MAPTYPE_TEAM_DISABLE	= 0x0020,    // 32
    MAPTYPE_TELEPORT_DISABLE	= 0x0040,    // 64                    // chgmap by action
    MAPTYPE_SYN_MAP		= 0x0080,    // 128
    MAPTYPE_PRISON_MAP		= 0x0100,    // 256
    MAPTYPE_WING_DISABLE	= 0x0200,    // 512                    // bowman fly disable
    MAPTYPE_FAMILY		= 0x0400,    // 1024
    MAPTYPE_MINEFIELD		= 0x0800,    // 2048
    MAPTYPE_CALLNEWBIE_DISABLE	= 0x1000,    // 4096
    MAPTYPE_REBORN_NOW_ENABLE	= 0x2000,    // 8192
    MAPTYPE_NEWBIE_PROTECT	= 0x4000,    // 16384    
}
That should make a bit more sense.
01/19/2012 16:22 Korvacs#44
Yeah i know what it does and how it works, but i dont know what it does. For example we have one that disables PK which is pretty obvious, this is part of the battle system for eo and doesnt really have any real explanation as to what it actually does, except that i know that it acts sort of like arena in that it determines if you receive a flashing name or not. So i need to know what it does....i thought that was clear in my thread :p
01/19/2012 16:48 CptSky#45
Quote:
Originally Posted by Korvacs View Post
Yeah i know what it does and how it works, but i dont know what it does. For example we have one that disables PK which is pretty obvious, this is part of the battle system for eo and doesnt really have any real explanation as to what it actually does, except that i know that it acts sort of like arena in that it determines if you receive a flashing name or not. So i need to know what it does....i thought that was clear in my thread :p
MAPTYPE_NEWBIE_PROTECT (DEAD_ISLAND in EO) is the newbie protection on map. By memory, it was lvl 26- that was protected from being killed by other people.