Jump to content

SQL -> XML using template


Kara

Recommended Posts

Greetings, i'm not familiar with the conversion, i would love let's say to move NPC's with their elements, AI, skills into xml using a template i want. 

The question is how you make this happen automatically? Im thinking it's a procedure like, let's say JOIN tables and then you do what?

Thanks a lot

Ps. im about to code a sql-xml generator which will do the work for me using a template ill add and replace the fields after i JOINED them all. 

Edited by GamePsychology
Link to comment
Share on other sites

1 hour ago, .Elfocrash said:

The real question is why you want to do that?

Unfortunately i've done it already. Made a 500 line code and convert it using template from sql to xml. 

The reason i want to do this is because i find xml easier to adjust than enter in SQL. In the end i can add more variables such as parameters and no have to create new table in navicat. Why you don't like it? 

 

Kinda the idea.: 

  

	<npc id="%id%" %templateId% level="%level%" type="%type%" name="%name%" title="%title%">
        <race>%race%</race>
        <sex>%sex%</sex>
        <stats str="%str%" con="%con%" dex="%dex%" wit="%wit%" int="%int%" men="%men%" exp="%exp%" sp="%sp%">
            <vitals hp="%hp%" mp="%mp%" hpRegen="%hpRegen%" mpRegen="%mpRegen%" />
            <attack physical="%physical%" magical="%magical%" critical="%critical%" atkSpd="%atkSpd%" mAtkSpd="%mAtkSpd%" range="%range%" aggro="%aggro%" rhand="%rhand%" lhand="%lhand%" enchant="%enchant%"/>
            <defence physical="%defPhysical%" magical="%defMagical%" />
			%attributes%
            <speed>
                <walk speed="%wspeed%" />
                <run speed="%rspeed%" />
            </speed>
        </stats>
        %skills%
        <targetable>%targetable%</targetable>
        <show_name>%show_name%</show_name>
        <dropHerbGroup>%dropHerbGroup%</dropHerbGroup>
        <baseStats>%baseStats%</baseStats>
        %ai%
        <collision>
            <radius normal="%colradius%" />
            <height normal="%colheight%" />
        </collision>
    </npc>

 

Edited by GamePsychology
Link to comment
Share on other sites

It is a case by case scenario tbh.

Platforms that don't need to be flexible and try to replicate a playstyle (aCis, Unity, L2jServer) can benefit from XML because there is no need for tables. Values that essentially will never change or they will be changed once.
Platforms that need to be flexible and constantly change and fine tune the game play (any l2j server ever) would benefit from SQL as it is way more flexible, able to do relations between entities easily and flexibly.

I find the sql -> xml change  downgrade personally because of how fluent i am in SQL and what i can achieve with it.
Just a personal opinion here.

Edited by .Elfocrash
Link to comment
Share on other sites

34 minutes ago, .Elfocrash said:

It is a case by case scenario tbh.

Platforms that don't need to be flexible and try to replicate a playstyle (aCis, Unity, L2jServer) can benefit from XML because there is no need for tables. Values that essentially will never change or they will be changed once.
Platforms that need to be flexible and constantly change and fine tune the game play (any l2j server ever) would benefit from SQL as it is way more flexible, able to do relations between entities easily and flexibly.

I find the sql -> xml change  downgrade personally because of how fluent i am in SQL and what i can achieve with it.
Just a personal opinion here.

Afcourse your opinion is helpful, but still i can't get why you consider this a downgration. SQL is useful when there is connectivity - relation between data. But in case of L2J is very "opposite" situation. Except the droplist which afc ill let in SQL cause i like to be non static and used by admin all other data i guess does not affect the values written in current database such as NPC elementals e.t.c

Edited by GamePsychology
Link to comment
Share on other sites

18 hours ago, .Elfocrash said:

It is a case by case scenario tbh.

Platforms that don't need to be flexible and try to replicate a playstyle (aCis, Unity, L2jServer) can benefit from XML because there is no need for tables. Values that essentially will never change or they will be changed once.
Platforms that need to be flexible and constantly change and fine tune the game play (any l2j server ever) would benefit from SQL as it is way more flexible, able to do relations between entities easily and flexibly.

I find the sql -> xml change  downgrade personally because of how fluent i am in SQL and what i can achieve with it.
Just a personal opinion here.

You affected me, i made it and the next minute i dropped it back to SQL :/

You ruined my dreams sir 

Link to comment
Share on other sites

On 30.10.2017 at 4:09 PM, GamePsychology said:

Afcourse

Oh you.. This confirm peoples suspicious, you are Access. Without doubts :D

Edited by SweeTs
Link to comment
Share on other sites

1 hour ago, SweeTs said:

Oh you.. This confirm peoples suspicious, you are Access. Without doubts :D

Who suspect this and who is Access? 

Edited by SweeTs
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • Good morning, how do I use it to open a npcname.txt file from l2 c1? I made some progress and understood that I must create a bat file with the following specifications: l2encdec_old -e 121 npcname-e.txt   When I run the .bat it creates a new enc-npcname-e.txt  But when I open it, I still can't read the files Is there something wrong with the code I ran?    
    • Hello! Since this video with those cool agathions belongs to Asuki, better ask him if they are private or free. As for me, since KejbL mentioned me, I've also done a lot of work of this kind, such as body-attached auras in the form of agathions like in the video and cool versions that attach to the back like agathions as well. If you're interested, I can show you some examples.
    • Server Rates: » Xp 500x. » Sp 500x. » Aden 500x. » Drop 1x. » PartyXp 2x. » PartySp 2x. » Starting character level -1 Enchant rates: » Safe enchant +4. » Blessed and simple scrolls max enchant (+16). » Crystal scrolls max enchant (+16). » Simple enchant scrolls chance – 65%. » Blessed enchant scrolls chance – 80%. » Crystal enchant scrolls chance – 90% Augmentations: » High life stone skill chance – 10%. » Top life stone skill chance – 15%. » Augments 1 active   1passive Unique features: » Main town – Giran » Automatic-Manual Potions. » Working 2 castle sieges. (Giran-Aden) » SPS cancel lasts 10 seconds and than buffs come back. » Stackable scrolls, lifestones, book of giants. » Unique pvp zone » More then 11 active raid bosses. » Wedding system. » Unique farming areas. » Npc skill enchanter. » Full npc buffer with auto buff. » Max count of buffs – 55. » Max subclasses – 4. » Free and no quest class change. » Free and no quest sub class. » Raid boss drop nobless item. » No weight limit. » Unique protection anti-hwy armor for archers/daggers etc. » Ingame password change. » Top pvp/pk/online ranks NPC. » Unique monsters & NPC. » Interlude retail skills. » Server up-time [24/7] [99]%. » Perfect class balance (all class can kill all class depending on players skill and setup knowledge,gear,augmentations). » Announcements on double kills triple kills etc. » Announcements on Grand Boss death , with the name of the killer as well as clan name of the player. » Information Npc in game with all servers infromations.   🌐 https://l2-prodigy.com ✅ https://discord.gg/bEphbJ4WY7
    • Good morning, how do I use it to open a npcname.txt file from l2 c1? Good morning, I made some progress and understood that I must create a bat file with the following specifications: l2encdec_old -e 121 npcname-e.txt   When I run the .bat it creates a new enc-npcname-e.txt  But when I open it, I still can't read the files Is there something wrong with the code I ran?    
    • It's on formula the skill launch time, if you decrease it, you won't see the whole visual effect, close please.
  • Topics

×
×
  • Create New...