mmo-dev team

whiteo

cvaba community
Уважаемый собеседник
Разработчик
Победитель в номинации 2025
Орден Великого Хилера
Баг мой - друг мой
Старожил I степени
Хроники
  1. Prelude
  2. Harbingers of War
  3. Age of Splendor
  4. Rise of Darkness
  5. Scions of Destiny
  6. Oath of Blood
  7. Interlude
  8. The 1st Throne: The Kamael
  9. The 1st Throne: Hellbound
  10. The 2nd Throne: Gracia
  11. The 2nd Throne: Freya
  12. Chaotic Throne: High Five
  13. Goddess of Destruction Awakening
  14. Goddess of Destruction Harmony
  15. Goddess of Destruction Tauti
  16. Goddess of Destruction Glory Days
  17. Goddess of Destruction Lindvior
  18. Valliance / Epeisodion / Raiders
  19. Ertheia / Dimensional Strangers
  20. Infinite Odyssey
  21. Helios
  22. Grand Cursade
  23. Salvation
  24. Fafurion
  25. Shadow of the Kamael
  26. Prelude Of War
  27. Homunculus
  28. Return Of The Queen Ant
  29. Master Class
Всем привет, в моей прошлой теме тыц, мы успели пообсуждать кто, что и как пишет.
В итоге я решил что пора бы уже делать что-то, что можно было бы и людям показать.
Посему предлагаю организовать команду, чтобы совместно сделать качественный продукт.
Конечно, не все захотят тратить время, а кому-то денег подавай, но тут каждому свое. Если хотите внести вклад — милости просим.
Сразу скажу: Java, Go :Bingo:
Для начала я выкатил в репозиторий только логин-сервер. Но даже по нему уже можно посмотреть, насколько я упоролся.
Если ты такой же упоротый — ты тот, кто нужен команде mmo-dev team!
З.Ы. Зачатки гейм-сервера залью чуть позже.

github:

P.S. Пост будет дополнятся.
 
Последнее редактирование:
А я только-только придумал название и убойный слоган. Без всяких там "олдсклы"
 
dLeto, не томи)
Сообщение объединено:
Вернувшись с отпуска, ковыряюсь в totalchecker.
Есть знающие люди, которые точно знают, есть ли разница между totalchecker и totalchecker2015, в контексте общих механик/формул?
 
Последнее редактирование:
whiteo, как прогресс? Я вот уже кучу ошибок собрал, переписываю в N-ый раз (скоро будет NN-ый). Тешу себя тем, что я чему то обучаюсь.
 
dLeto, процесс идет, но я слегка замедлился, нужно отрефакторить свой говнокод что бы идти дальше)
Сообщение объединено:
попросил чатгпт наколдовать мне .html что бы визуально видеть разницу по классам, хз зачем оно мне надо
 
Последнее редактирование:
whiteo, понятно... фигней страдаешь...
 
dLeto, не совсем, я занят примерно вот этим
Код:
// Code generated by questgen from questdata. DO NOT EDIT.

package quest

// quest 202 hmage_tutorial — 2 npc(s), 11 event(s)
type q202_hmage_tutorial struct{}

func (q202_hmage_tutorial) ID() int32 { return 202 }

func (q202_hmage_tutorial) OnEvent(c Ctx, event string, extras ...string) {
    switch c.NPCTemplate() {
    case 1030017: /*@gallin*/
        switch event {
        case "menu":
            {
                ask := extraInt(extras, 0)
                reply := extraInt(extras, 1)
                talker := c.CharID
                if (ask == 420) {
                    if ((reply == 31) && (h.OwnItemCount(c, talker, 1068 /*@recommendation_02*/) > 0)) {
                        if ((h.IsInCategory(c, 2 /*@fighter_group*/, h.Occupation(c, talker)) != 0) && (h.OwnItemCount(c, talker, 5789 /*@soulshot_none_for_rookie*/) <= 200)) {
                            h.VoiceEffect(c, talker, "tutorial_voice_026", 1000)
                            h.GiveItem1(c, talker, 5789 /*@soulshot_none_for_rookie*/, 200)
                        }
                        if (((h.IsInCategory(c, 3 /*@mage_group*/, h.Occupation(c, talker)) != 0) && (h.OwnItemCount(c, talker, 5789 /*@soulshot_none_for_rookie*/) <= 200)) && (h.OwnItemCount(c, talker, 5790 /*@spiritshot_none_for_rookie*/) <= 100)) {
                            if (h.Occupation(c, talker) == 49 /*@orc_mage*/) {
                                h.VoiceEffect(c, talker, "tutorial_voice_026", 1000)
                                h.GiveItem1(c, talker, 5789 /*@soulshot_none_for_rookie*/, 200)
                            } else {
                                h.VoiceEffect(c, talker, "tutorial_voice_027", 1000)
                                h.GiveItem1(c, talker, 5790 /*@spiritshot_none_for_rookie*/, 100)
                            }
                        }
                        h.ShowPage(c, talker, "gallin002.htm")
                        h.DeleteItem1(c, talker, 1068 /*@recommendation_02*/, 1)
                        h.AddTimerEx(c, (h.GetIndexFromCreature(c, talker) + 1000000 /*@MAX_TIMER_ID*/), (1000 * 60))
                        h.ShowTutorialMark(c, talker, 0, 28)
                        if (h.GetMemoStateEx(c, talker, 255, 1) <= 3) {
                            h.SetMemoStateEx(c, talker, 255, 1, 4)
                        }
                    }
                }
            }
        }
    }
}

func (q202_hmage_tutorial) OnTalk(c Ctx) {
    switch c.NPCTemplate() {
    case 1030019: /*@doff*/
        {
            var i0 int32
            var i1 int32
            talker := c.CharID
            if (h.GetMemoStateEx(c, talker, 255, 1) < 0) {
                if ((h.Occupation(c, talker) == 10 /*@mage*/) && (h.Race(c, talker) == 0 /*@race_human*/)) {
                    h.DeleteRadar(c, talker, -91036, 248044, -3568, 2)
                    h.AddTimerEx(c, (h.GetIndexFromCreature(c, talker) + 1000000 /*@MAX_TIMER_ID*/), (1000 * 30))
                    h.ShowPage(c, talker, "doff001.htm")
                    h.SetMemoStateEx(c, talker, 255, 1, 0)
                    i1 = h.GetMemoState(c, talker, 255 /*@TUTORIAL_QUEST_ID*/)
                    i0 = (i1 & 0x7fffff00)
                    h.EnableTutorialEvent(c, talker, (i0 | 1048576 /*@TUTORIAL_PICK_BLUE_GEM*/))
                } else {
                    h.ShowPage(c, talker, "carl006.htm")
                }
                return
            }
        }
        {
            talker := c.CharID
            if ((((h.GetMemoStateEx(c, talker, 255, 1) == 1) || (h.GetMemoStateEx(c, talker, 255, 1) == 2)) || (h.GetMemoStateEx(c, talker, 255, 1) == 0)) && (h.OwnItemCount(c, talker, 6353 /*@tutorial_blue_gem*/) < 1)) {
                h.ShowPage(c, talker, "doff002.htm")
                return
            }
        }
        {
            var i0 int32
            talker := c.CharID
            if ((((h.GetMemoStateEx(c, talker, 255, 1) == 2) || (h.GetMemoStateEx(c, talker, 255, 1) == 1)) || (h.GetMemoStateEx(c, talker, 255, 1) == 0)) && (h.OwnItemCount(c, talker, 6353 /*@tutorial_blue_gem*/) > 0)) {
                h.ShowPage(c, talker, "doff003.htm")
                h.DeleteItem1(c, talker, 6353 /*@tutorial_blue_gem*/, h.OwnItemCount(c, talker, 6353 /*@tutorial_blue_gem*/))
                h.SetMemoStateEx(c, talker, 255, 1, 3)
                h.GiveItem1(c, talker, 1068 /*@recommendation_02*/, 1)
                h.AddTimerEx(c, (h.GetIndexFromCreature(c, talker) + 1000000 /*@MAX_TIMER_ID*/), (1000 * 30))
                i0 = (h.GetMemoState(c, talker, 255 /*@TUTORIAL_QUEST_ID*/) & 0x7fffff00)
                h.SetMemoState(c, talker, 255 /*@TUTORIAL_QUEST_ID*/, (i0 | 4))
                if ((h.IsInCategory(c, 2 /*@fighter_group*/, h.Occupation(c, talker)) != 0) && (h.OwnItemCount(c, talker, 5789 /*@soulshot_none_for_rookie*/) <= 0)) {
                    h.GiveItem1(c, talker, 5789 /*@soulshot_none_for_rookie*/, 200)
                    h.VoiceEffect(c, talker, "tutorial_voice_026", 1000)
                    h.GiveItem1(c, talker, 49036 /*@chobo_quick_step_potion*/, 5)
                    h.GiveItem1(c, talker, 10650 /*@scroll_of_escape_newbie*/, 5)
                }
                if (((h.IsInCategory(c, 3 /*@mage_group*/, h.Occupation(c, talker)) != 0) && (h.OwnItemCount(c, talker, 5789 /*@soulshot_none_for_rookie*/) <= 0)) && (h.OwnItemCount(c, talker, 5790 /*@spiritshot_none_for_rookie*/) <= 0)) {
                    if (h.Occupation(c, talker) == 49 /*@orc_mage*/) {
                        h.VoiceEffect(c, talker, "tutorial_voice_026", 1000)
                        h.GiveItem1(c, talker, 5789 /*@soulshot_none_for_rookie*/, 200)
                        h.GiveItem1(c, talker, 49036 /*@chobo_quick_step_potion*/, 5)
                        h.GiveItem1(c, talker, 10650 /*@scroll_of_escape_newbie*/, 5)
                    } else {
                        h.VoiceEffect(c, talker, "tutorial_voice_027", 1000)
                        h.GiveItem1(c, talker, 5790 /*@spiritshot_none_for_rookie*/, 100)
                        h.GiveItem1(c, talker, 49036 /*@chobo_quick_step_potion*/, 5)
                        h.GiveItem1(c, talker, 10650 /*@scroll_of_escape_newbie*/, 5)
                    }
                }
                return
            }
        }
        {
            talker := c.CharID
            if (h.GetMemoStateEx(c, talker, 255, 1) == 3) {
                h.ShowPage(c, talker, "doff004.htm")
                return
            }
        }
        {
            talker := c.CharID
            if (h.GetMemoStateEx(c, talker, 255, 1) > 3) {
                h.ShowPage(c, talker, "carl005.htm")
                return
            }
        }
    case 1030017: /*@gallin*/
        {
            talker := c.CharID
            if (h.OwnItemCount(c, talker, 1068 /*@recommendation_02*/) > 0) {
                h.ShowPage(c, talker, "gallin001.htm")
                return
            }
        }
        {
            talker := c.CharID
            if ((h.OwnItemCount(c, talker, 1068 /*@recommendation_02*/) == 0) && (h.GetMemoStateEx(c, talker, 255, 1) > 3)) {
                h.ShowPage(c, talker, "gallin004.htm")
                return
            }
        }
        {
            talker := c.CharID
            if ((h.OwnItemCount(c, talker, 1068 /*@recommendation_02*/) == 0) && (h.GetMemoStateEx(c, talker, 255, 1) <= 3)) {
                h.ShowPage(c, talker, "gallin003.htm")
                return
            }
        }
    }
}
 
whiteo, это клиент или сервер?
 
dLeto, сервер, я в клиент не лезу, для меня там нечего изменять
Сообщение объединено:
так же закончил работу не только над questgen но и над dataconv
Код:
{
  "olympiad": {
    "timeSetting": "20:00",
    "forbiddenWeapons": [
      {
        "name": "cloak_of_str",
        "itemId": 30373
      },
      {
        "name": "cloak_of_hero",
        "itemId": 30372
      },
      {
        "name": "the_infinity_blade",
        "itemId": 6611
      },
      {
        "name": "the_infinity_cleaver",
        "itemId": 6612
      },
      {
        "name": "the_infinity_axe",
        "itemId": 6613
      },
      {
        "name": "the_infinity_rod",
        "itemId": 6614
      },
      {
        "name": "the_infinity_scepter",
        "itemId": 6616
      },
      {
        "name": "the_infinity_stinger",
        "itemId": 6617
      },
      {
        "name": "the_infinity_fangs",
        "itemId": 6618
      },
      {
        "name": "the_infinity_bow",
        "itemId": 6619
      },
      {
        "name": "the_infinity_wings",
        "itemId": 6620
      },
      {
        "name": "the_infinity_spear",
        "itemId": 6621
      }
    ],
    "pointDenominator": [
      5,
      5,
      5
    ],
    "pointWeight": [
      100,
      100,
      150
    ],
    "matchLimit": [
      30,
      30,
      0,
      0
    ],
    "resetSkillExcluded": [
      {
        "name": "s_super_haste1",
        "skillId": 7029,
        "level": 1
      }
    ],
    "resetSkill": 900
  },
  "heroSkills": [
    {
      "name": "s_hero_heroic_miracle",
      "skillId": 395,
      "level": 1
    },
    {
      "name": "s_hero_heroic_berserker",
      "skillId": 396,
      "level": 1
    },
    {
      "name": "s_hero_heroic_valor",
      "skillId": 1374,
      "level": 1
    },
    {
      "name": "s_hero_heroic_grandeur",
      "skillId": 1375,
      "level": 1
    },
    {
      "name": "s_hero_heroic_dread",
      "skillId": 1376,
      "level": 1
    }
  ]
}
уже больше недели пытаюсь сделать что-то типа aigen, пока плохо выходит...
 
Последнее редактирование:
dLeto, да,
Генератор квестов, генерит сразу же qXXX_quest_name_gen.go уже готовый файл, серверу остается только взять его и работать с ним.
Конвертер данных, делает .txt -> .json5, в тот формат который нужен мне.
Сообщение объединено:
тем временем я похерил спавн мобов :Hahaha:
 
Последнее редактирование:
У тебя недавно был только логин сервер. Ты "просто" с какого то сервера переписал на go?
 
dLeto, эм, ты ошибаешься, у меня был гейм сервер, он просто в говнокоде, поэтому его в шаре нет
Сообщение объединено:
dLeto, посчитал что лучше доделать датапак до конца и вернутся к серверу чем скакать, туда - сюда.
Сообщение объединено:
вот что-то тип того у меня получается на выходе при использовании aigen
Код:
// Code generated by aigen. DO NOT EDIT.

package generated

import "github.com/mmo-dev-team/l2go-game/internal/ai"

var aiWarriorAggressiveP = struct {
    AcceptShoutTarget         int32
    AttackLowHP               int32
    AttackLowLevel            int32
    Attack_BoostValue         float32
    Attack_DecayRatio         float32
    Chase_BoostValue          float32
    Chase_DecayRatio          float32
    CreviceOfDiminsion        int32
    DaggerBackAttack          int32
    Decaying_BoostValue       float32
    Decaying_DecayRatio       float32
    DesirePqSize              int32
    DoNothing_BoostValue      float32
    DoNothing_DecayRatio      float32
    DungeonType               int32
    DungeonTypeAI             int32
    DungeonTypePrivate        string
    EffectAction_BoostValue   float32
    EffectAction_DecayRatio   float32
    FavorListSize             int32
    Flee_BoostValue           float32
    Flee_DecayRatio           float32
    Follow_BoostValue         float32
    Follow_DecayRatio         float32
    FriendShip                int32
    FriendShip1               int32
    FriendShip2               int32
    FriendShip3               int32
    FriendShip4               int32
    FriendShip5               int32
    GetItem_BoostValue        float32
    GetItem_DecayRatio        float32
    HalfAggressive            int32
    HealBonus                 int32
    HelpHeroAI                string
    HelpHeroSilhouette        int32
    IdleDesire_BoostValue     float32
    IdleDesire_DecayRatio     float32
    IsSay                     int32
    IsTransform               int32
    IsVs                      int32
    LongRangeGuardRate        int32
    MoveAroundSocial          int32
    MoveAroundSocial1         int32
    MoveAroundSocial2         int32
    MoveAround_BoostValue     float32
    MoveAround_DecayRatio     float32
    MoveToTarget_BoostValue   float32
    MoveToTarget_DecayRatio   float32
    MoveToWayPoint_BoostValue float32
    MoveToWayPoint_DecayRatio float32
    MoveTo_BoostValue         float32
    MoveTo_DecayRatio         float32
    RandomAggressive          int32
    RunAway                   int32
    SSQLoserTeleport          int32
    SSQTelPosX                int32
    SSQTelPosY                int32
    SSQTelPosZ                int32
    SeeCreatureAttackerTime   int32
    SelfExplosion             int32
    SetAggressiveTime         int32
    SetCurse                  int32
    SetHateGroup              int32
    SetHateGroupRatio         int32
    SetHateOccupation         int32
    SetHateOccupationRatio    int32
    SetHateRace               int32
    SetHateRaceRatio          int32
    ShoutMsg1                 int32
    ShoutMsg2                 int32
    ShoutMsg3                 int32
    ShoutMsg4                 int32
    ShoutTarget               int32
    SoulShot                  int32
    SoulShotRate              int32
    SpecialSkill              int32
    SpeedBonus                int32
    SpiritShot                int32
    SpiritShotRate            int32
    SwapPosition              int32
    UseSkill_BoostValue       float32
    UseSkill_DecayRatio       float32
    step1                     int32
    step2                     int32
    step3                     int32
}{
    AcceptShoutTarget:         0,
    AttackLowHP:               0,
    AttackLowLevel:            0,
    Attack_BoostValue:         float32(300),
    Attack_DecayRatio:         float32(6.6),
    Chase_BoostValue:          float32(0),
    Chase_DecayRatio:          float32(0),
    CreviceOfDiminsion:        0,
    DaggerBackAttack:          7000,
    Decaying_BoostValue:       float32(0),
    Decaying_DecayRatio:       float32(0),
    DesirePqSize:              50,
    DoNothing_BoostValue:      float32(0),
    DoNothing_DecayRatio:      float32(0),
    DungeonType:               0,
    DungeonTypeAI:             0,
    DungeonTypePrivate:        "",
    EffectAction_BoostValue:   float32(0),
    EffectAction_DecayRatio:   float32(0),
    FavorListSize:             30,
    Flee_BoostValue:           float32(0),
    Flee_DecayRatio:           float32(0),
    Follow_BoostValue:         float32(0),
    Follow_DecayRatio:         float32(0),
    FriendShip:                0,
    FriendShip1:               0,
    FriendShip2:               0,
    FriendShip3:               0,
    FriendShip4:               0,
    FriendShip5:               0,
    GetItem_BoostValue:        float32(0),
    GetItem_DecayRatio:        float32(0),
    HalfAggressive:            0,
    HealBonus:                 0,
    HelpHeroAI:                "warrior_hero",
    HelpHeroSilhouette:        0,
    IdleDesire_BoostValue:     float32(0),
    IdleDesire_DecayRatio:     float32(0),
    IsSay:                     0,
    IsTransform:               0,
    IsVs:                      0,
    LongRangeGuardRate:        -1,
    MoveAroundSocial:          0,
    MoveAroundSocial1:         0,
    MoveAroundSocial2:         0,
    MoveAround_BoostValue:     float32(0),
    MoveAround_DecayRatio:     float32(0),
    MoveToTarget_BoostValue:   float32(0),
    MoveToTarget_DecayRatio:   float32(0),
    MoveToWayPoint_BoostValue: float32(0),
    MoveToWayPoint_DecayRatio: float32(0),
    MoveTo_BoostValue:         float32(0),
    MoveTo_DecayRatio:         float32(0),
    RandomAggressive:          0,
    RunAway:                   1,
    SSQLoserTeleport:          0,
    SSQTelPosX:                0,
    SSQTelPosY:                0,
    SSQTelPosZ:                0,
    SeeCreatureAttackerTime:   -1,
    SelfExplosion:             0,
    SetAggressiveTime:         -1,
    SetCurse:                  0,
    SetHateGroup:              -1,
    SetHateGroupRatio:         0,
    SetHateOccupation:         -1,
    SetHateOccupationRatio:    0,
    SetHateRace:               -1,
    SetHateRaceRatio:          0,
    ShoutMsg1:                 0,
    ShoutMsg2:                 0,
    ShoutMsg3:                 0,
    ShoutMsg4:                 0,
    ShoutTarget:               0,
    SoulShot:                  0,
    SoulShotRate:              0,
    SpecialSkill:              7000,
    SpeedBonus:                0,
    SpiritShot:                0,
    SpiritShotRate:            0,
    SwapPosition:              0,
    UseSkill_BoostValue:       float32(100000),
    UseSkill_DecayRatio:       float32(0),
    step1:                     1020130,
    step2:                     1020006,
    step3:                     1020853,
}

type aiWarriorAggressive struct{}

var aiWarriorAggressiveTemplates = []int32{1020012, 1020017, 1020018, 1020022, 1020024, 1020025, 1020034, 1020042, 1020047, 1020049, 1020060, 1020064, 1020070, 1020071, 1020072, 1020080, 1020093, 1020099, 1020103, 1020108, 1020111, 1020133, 1020135, 1020140, 1020141, 1020143, 1020148, 1020150, 1020155, 1020156, 1020158, 1020159, 1020161, 1020162, 1020166, 1020167, 1020169, 1020170, 1020173, 1020174, 1020191, 1020193, 1020205, 1020243, 1020249, 1020253, 1020254, 1020275, 1020280, 1020282, 1020285, 1020287, 1020295, 1020302, 1020305, 1020310, 1020313, 1020314, 1020323, 1020324, 1020329, 1020340, 1020342, 1020343, 1020350, 1020356, 1020362, 1020364, 1020367, 1020371, 1020372, 1020375, 1020386, 1020387, 1020394, 1020402, 1020404, 1020410, 1020425, 1020435, 1020455, 1020460, 1020461, 1020462, 1020464, 1020466, 1020471, 1020472, 1020479, 1020489, 1020491, 1020502, 1020504, 1020508, 1020516, 1020517, 1020519, 1020527, 1020543, 1020548, 1020557, 1020574, 1020579, 1020582, 1020592, 1020603, 1020636, 1020637, 1020638, 1020655, 1020743, 1020782, 1020783, 1020851, 1020852, 1020921, 1021093, 1021096, 1021099, 1021100, 1021118, 1021121, 1021122, 1021125, 1021129, 1021130, 1021134, 1021139, 1021142, 1021256, 1027029, 1027030, 1027124, 1027127, 1027128, 1027129, 1027131, 1027132, 1027133, 1027193, 1027219, 1027220, 1027221, 1027222, 1027223, 1027224, 1027225, 1027226, 1027227, 1027228, 1027229, 1027230, 1027231, 1027232, 1027233, 1027234, 1027235, 1027236, 1027237, 1027238, 1027239, 1027240, 1027241, 1027242, 1027243, 1027244, 1027245, 1027246, 1027247, 1027248, 1027249, 1027254, 1027255, 1027256, 1027262, 1027263, 1027264, 1027265, 1027273, 1027274, 1027275, 1027276, 1027277, 1027278, 1027279, 1027280, 1027281, 1027282, 1027283, 1027284, 1027285, 1027302, 1027303, 1027304, 1027305, 1027306, 1027307, 1027308, 1027309, 1027310, 1027311, 1027312}

func (aiWarriorAggressive) TemplateIDs() []int32 { return aiWarriorAggressiveTemplates }

func (aiWarriorAggressive) OnSeeCreature(c *ai.ScriptContext, creature int32) {
    if (h.Field(c, creature, "is_pc") == 0) && (h.IsInCategory(c, 15, h.Field(c, creature, "npc_class_id")) == 0) {
        return
    }
    if aiWarriorAggressiveP.SeeCreatureAttackerTime == -1 {
        if aiWarriorAggressiveP.SetAggressiveTime == -1 {
            if (h.GetLifeTime(c) >= (h.Rand(c, 5) + 3)) && (h.InMyTerritory(c, h.Field(c, c.Self, "sm")) != 0) {
                h.AddAttackDesire(c, creature, 1, float32(200))
            }
        } else {
            if aiWarriorAggressiveP.SetAggressiveTime == 0 {
                if h.InMyTerritory(c, h.Field(c, c.Self, "sm")) != 0 {
                    h.AddAttackDesire(c, creature, 1, float32(200))
                }
            } else {
                if (h.GetLifeTime(c) > (aiWarriorAggressiveP.SetAggressiveTime + h.Rand(c, 4))) && (h.InMyTerritory(c, h.Field(c, c.Self, "sm")) != 0) {
                    h.AddAttackDesire(c, creature, 1, float32(200))
                }
            }
        }
    } else {
        if (h.GetLifeTime(c) > aiWarriorAggressiveP.SeeCreatureAttackerTime) && (h.InMyTerritory(c, h.Field(c, c.Self, "sm")) != 0) {
            h.AddAttackDesire(c, creature, 1, float32(200))
        }
    }
    aiWarriorParameter{}.OnSeeCreature(c, creature)
}
 
Последнее редактирование:
Psycho, лучшая сборка это та которой нет. в качестве идеи она потрясающая: выдерживает онлайн более 10к, переработаны квесты и настроен баланс, лишнее убрано, удобство добавлено. Нереализованный идеал
Все... название есть, слоган есть. Структурировал все идеи которые копились лет 10 наверно, прогнал через чат гпт, чтобы красиво оформил. В итоге получилось 76 механик/ключевых идей. Одной не хватает до красивого числа. Теперь можно возвращаться от детской мечты к реальной работе.
Сообщение объединено:
посчитал что лучше доделать датапак до конца и вернутся к серверу чем скакать, туда - сюда.
Вот так пока косяки правишь - до контента не доберешься =)
 
Последнее редактирование:
dLeto, эм, ты ошибаешься, у меня был гейм сервер, он просто в говнокоде, поэтому его в шаре нет
Сообщение объединено:
dLeto, посчитал что лучше доделать датапак до конца и вернутся к серверу чем скакать, туда - сюда.
Сообщение объединено:
вот что-то тип того у меня получается на выходе при использовании aigen
Код:
// Code generated by aigen. DO NOT EDIT.

package generated

import "github.com/mmo-dev-team/l2go-game/internal/ai"

var aiWarriorAggressiveP = struct {
    AcceptShoutTarget         int32
    AttackLowHP               int32
    AttackLowLevel            int32
    Attack_BoostValue         float32
    Attack_DecayRatio         float32
    Chase_BoostValue          float32
    Chase_DecayRatio          float32
    CreviceOfDiminsion        int32
    DaggerBackAttack          int32
    Decaying_BoostValue       float32
    Decaying_DecayRatio       float32
    DesirePqSize              int32
    DoNothing_BoostValue      float32
    DoNothing_DecayRatio      float32
    DungeonType               int32
    DungeonTypeAI             int32
    DungeonTypePrivate        string
    EffectAction_BoostValue   float32
    EffectAction_DecayRatio   float32
    FavorListSize             int32
    Flee_BoostValue           float32
    Flee_DecayRatio           float32
    Follow_BoostValue         float32
    Follow_DecayRatio         float32
    FriendShip                int32
    FriendShip1               int32
    FriendShip2               int32
    FriendShip3               int32
    FriendShip4               int32
    FriendShip5               int32
    GetItem_BoostValue        float32
    GetItem_DecayRatio        float32
    HalfAggressive            int32
    HealBonus                 int32
    HelpHeroAI                string
    HelpHeroSilhouette        int32
    IdleDesire_BoostValue     float32
    IdleDesire_DecayRatio     float32
    IsSay                     int32
    IsTransform               int32
    IsVs                      int32
    LongRangeGuardRate        int32
    MoveAroundSocial          int32
    MoveAroundSocial1         int32
    MoveAroundSocial2         int32
    MoveAround_BoostValue     float32
    MoveAround_DecayRatio     float32
    MoveToTarget_BoostValue   float32
    MoveToTarget_DecayRatio   float32
    MoveToWayPoint_BoostValue float32
    MoveToWayPoint_DecayRatio float32
    MoveTo_BoostValue         float32
    MoveTo_DecayRatio         float32
    RandomAggressive          int32
    RunAway                   int32
    SSQLoserTeleport          int32
    SSQTelPosX                int32
    SSQTelPosY                int32
    SSQTelPosZ                int32
    SeeCreatureAttackerTime   int32
    SelfExplosion             int32
    SetAggressiveTime         int32
    SetCurse                  int32
    SetHateGroup              int32
    SetHateGroupRatio         int32
    SetHateOccupation         int32
    SetHateOccupationRatio    int32
    SetHateRace               int32
    SetHateRaceRatio          int32
    ShoutMsg1                 int32
    ShoutMsg2                 int32
    ShoutMsg3                 int32
    ShoutMsg4                 int32
    ShoutTarget               int32
    SoulShot                  int32
    SoulShotRate              int32
    SpecialSkill              int32
    SpeedBonus                int32
    SpiritShot                int32
    SpiritShotRate            int32
    SwapPosition              int32
    UseSkill_BoostValue       float32
    UseSkill_DecayRatio       float32
    step1                     int32
    step2                     int32
    step3                     int32
}{
    AcceptShoutTarget:         0,
    AttackLowHP:               0,
    AttackLowLevel:            0,
    Attack_BoostValue:         float32(300),
    Attack_DecayRatio:         float32(6.6),
    Chase_BoostValue:          float32(0),
    Chase_DecayRatio:          float32(0),
    CreviceOfDiminsion:        0,
    DaggerBackAttack:          7000,
    Decaying_BoostValue:       float32(0),
    Decaying_DecayRatio:       float32(0),
    DesirePqSize:              50,
    DoNothing_BoostValue:      float32(0),
    DoNothing_DecayRatio:      float32(0),
    DungeonType:               0,
    DungeonTypeAI:             0,
    DungeonTypePrivate:        "",
    EffectAction_BoostValue:   float32(0),
    EffectAction_DecayRatio:   float32(0),
    FavorListSize:             30,
    Flee_BoostValue:           float32(0),
    Flee_DecayRatio:           float32(0),
    Follow_BoostValue:         float32(0),
    Follow_DecayRatio:         float32(0),
    FriendShip:                0,
    FriendShip1:               0,
    FriendShip2:               0,
    FriendShip3:               0,
    FriendShip4:               0,
    FriendShip5:               0,
    GetItem_BoostValue:        float32(0),
    GetItem_DecayRatio:        float32(0),
    HalfAggressive:            0,
    HealBonus:                 0,
    HelpHeroAI:                "warrior_hero",
    HelpHeroSilhouette:        0,
    IdleDesire_BoostValue:     float32(0),
    IdleDesire_DecayRatio:     float32(0),
    IsSay:                     0,
    IsTransform:               0,
    IsVs:                      0,
    LongRangeGuardRate:        -1,
    MoveAroundSocial:          0,
    MoveAroundSocial1:         0,
    MoveAroundSocial2:         0,
    MoveAround_BoostValue:     float32(0),
    MoveAround_DecayRatio:     float32(0),
    MoveToTarget_BoostValue:   float32(0),
    MoveToTarget_DecayRatio:   float32(0),
    MoveToWayPoint_BoostValue: float32(0),
    MoveToWayPoint_DecayRatio: float32(0),
    MoveTo_BoostValue:         float32(0),
    MoveTo_DecayRatio:         float32(0),
    RandomAggressive:          0,
    RunAway:                   1,
    SSQLoserTeleport:          0,
    SSQTelPosX:                0,
    SSQTelPosY:                0,
    SSQTelPosZ:                0,
    SeeCreatureAttackerTime:   -1,
    SelfExplosion:             0,
    SetAggressiveTime:         -1,
    SetCurse:                  0,
    SetHateGroup:              -1,
    SetHateGroupRatio:         0,
    SetHateOccupation:         -1,
    SetHateOccupationRatio:    0,
    SetHateRace:               -1,
    SetHateRaceRatio:          0,
    ShoutMsg1:                 0,
    ShoutMsg2:                 0,
    ShoutMsg3:                 0,
    ShoutMsg4:                 0,
    ShoutTarget:               0,
    SoulShot:                  0,
    SoulShotRate:              0,
    SpecialSkill:              7000,
    SpeedBonus:                0,
    SpiritShot:                0,
    SpiritShotRate:            0,
    SwapPosition:              0,
    UseSkill_BoostValue:       float32(100000),
    UseSkill_DecayRatio:       float32(0),
    step1:                     1020130,
    step2:                     1020006,
    step3:                     1020853,
}

type aiWarriorAggressive struct{}

var aiWarriorAggressiveTemplates = []int32{1020012, 1020017, 1020018, 1020022, 1020024, 1020025, 1020034, 1020042, 1020047, 1020049, 1020060, 1020064, 1020070, 1020071, 1020072, 1020080, 1020093, 1020099, 1020103, 1020108, 1020111, 1020133, 1020135, 1020140, 1020141, 1020143, 1020148, 1020150, 1020155, 1020156, 1020158, 1020159, 1020161, 1020162, 1020166, 1020167, 1020169, 1020170, 1020173, 1020174, 1020191, 1020193, 1020205, 1020243, 1020249, 1020253, 1020254, 1020275, 1020280, 1020282, 1020285, 1020287, 1020295, 1020302, 1020305, 1020310, 1020313, 1020314, 1020323, 1020324, 1020329, 1020340, 1020342, 1020343, 1020350, 1020356, 1020362, 1020364, 1020367, 1020371, 1020372, 1020375, 1020386, 1020387, 1020394, 1020402, 1020404, 1020410, 1020425, 1020435, 1020455, 1020460, 1020461, 1020462, 1020464, 1020466, 1020471, 1020472, 1020479, 1020489, 1020491, 1020502, 1020504, 1020508, 1020516, 1020517, 1020519, 1020527, 1020543, 1020548, 1020557, 1020574, 1020579, 1020582, 1020592, 1020603, 1020636, 1020637, 1020638, 1020655, 1020743, 1020782, 1020783, 1020851, 1020852, 1020921, 1021093, 1021096, 1021099, 1021100, 1021118, 1021121, 1021122, 1021125, 1021129, 1021130, 1021134, 1021139, 1021142, 1021256, 1027029, 1027030, 1027124, 1027127, 1027128, 1027129, 1027131, 1027132, 1027133, 1027193, 1027219, 1027220, 1027221, 1027222, 1027223, 1027224, 1027225, 1027226, 1027227, 1027228, 1027229, 1027230, 1027231, 1027232, 1027233, 1027234, 1027235, 1027236, 1027237, 1027238, 1027239, 1027240, 1027241, 1027242, 1027243, 1027244, 1027245, 1027246, 1027247, 1027248, 1027249, 1027254, 1027255, 1027256, 1027262, 1027263, 1027264, 1027265, 1027273, 1027274, 1027275, 1027276, 1027277, 1027278, 1027279, 1027280, 1027281, 1027282, 1027283, 1027284, 1027285, 1027302, 1027303, 1027304, 1027305, 1027306, 1027307, 1027308, 1027309, 1027310, 1027311, 1027312}

func (aiWarriorAggressive) TemplateIDs() []int32 { return aiWarriorAggressiveTemplates }

func (aiWarriorAggressive) OnSeeCreature(c *ai.ScriptContext, creature int32) {
    if (h.Field(c, creature, "is_pc") == 0) && (h.IsInCategory(c, 15, h.Field(c, creature, "npc_class_id")) == 0) {
        return
    }
    if aiWarriorAggressiveP.SeeCreatureAttackerTime == -1 {
        if aiWarriorAggressiveP.SetAggressiveTime == -1 {
            if (h.GetLifeTime(c) >= (h.Rand(c, 5) + 3)) && (h.InMyTerritory(c, h.Field(c, c.Self, "sm")) != 0) {
                h.AddAttackDesire(c, creature, 1, float32(200))
            }
        } else {
            if aiWarriorAggressiveP.SetAggressiveTime == 0 {
                if h.InMyTerritory(c, h.Field(c, c.Self, "sm")) != 0 {
                    h.AddAttackDesire(c, creature, 1, float32(200))
                }
            } else {
                if (h.GetLifeTime(c) > (aiWarriorAggressiveP.SetAggressiveTime + h.Rand(c, 4))) && (h.InMyTerritory(c, h.Field(c, c.Self, "sm")) != 0) {
                    h.AddAttackDesire(c, creature, 1, float32(200))
                }
            }
        }
    } else {
        if (h.GetLifeTime(c) > aiWarriorAggressiveP.SeeCreatureAttackerTime) && (h.InMyTerritory(c, h.Field(c, c.Self, "sm")) != 0) {
            h.AddAttackDesire(c, creature, 1, float32(200))
        }
    }
    aiWarriorParameter{}.OnSeeCreature(c, creature)
}
Не следует назначать id шаблонов npc внутри класса AI — каждый npc должен иметь возможность получить любой AI. Также тебе нужно переопределять родительский класс AI, а эти параметры являются лишь значением по умолчанию, которое наследуется от родителей и переопределяется шаблонами npc / spawn maker.
Если дочерний класс переопределяет значение по умолчанию, это переопределение должно применяться и к родительскому значению (при условии, что оно задано в родителе)
 
Candice, aigen не идеален, когда руки дойдут до него применю твои рекомендации, спасибо
 
whiteo, чтение наска просто существует
 
kick, я знаю, а как я бы иначе понимал как там все работает.
Однако я осознано делаю свое, так как цель одна это perf-first.
Сообщение объединено:
Candice, переделал чуть,
Код:
// Code generated by aigen v1.0.0. DO NOT EDIT.

package generated

import "github.com/mmo-dev-team/l2go-game/internal/ai"

type aiWarriorAggressive struct{}

func (aiWarriorAggressive) OnSeeCreature(c *ai.ScriptContext, creature int32) {
    if (h.Field(c, creature, "is_pc") == 0) && (h.IsInCategory(c, 15, h.Field(c, creature, "npc_class_id")) == 0) {
        return
    }
    if c.P.SeeCreatureAttackerTime == -1 {
        if c.P.SetAggressiveTime == -1 {
            if (h.GetLifeTime(c) >= (h.Rand(c, 5) + 3)) && (h.InMyTerritory(c, h.Field(c, c.Self, "sm")) != 0) {
                h.AddAttackDesire(c, creature, 1, float32(200))
            }
        } else {
            if c.P.SetAggressiveTime == 0 {
                if h.InMyTerritory(c, h.Field(c, c.Self, "sm")) != 0 {
                    h.AddAttackDesire(c, creature, 1, float32(200))
                }
            } else {
                if (h.GetLifeTime(c) > (c.P.SetAggressiveTime + h.Rand(c, 4))) && (h.InMyTerritory(c, h.Field(c, c.Self, "sm")) != 0) {
                    h.AddAttackDesire(c, creature, 1, float32(200))
                }
            }
        }
    } else {
        if (h.GetLifeTime(c) > c.P.SeeCreatureAttackerTime) && (h.InMyTerritory(c, h.Field(c, c.Self, "sm")) != 0) {
            h.AddAttackDesire(c, creature, 1, float32(200))
        }
    }
    aiWarriorParameter{}.OnSeeCreature(c, creature)
}
 
Последнее редактирование:
Назад
Сверху Снизу