Skip to content

L2Homage; Making L2 Modding Accessible

Featured Replies

  • Author

Thanks Eressea.

 

I'll use the npcMakerEx for now then, to make sure it works for future changes.

 

Real life is going to be busy for a while now, but I'll get back to this project when I have spare time. It's progressing nicely. I'll share once spawn system is functional.

Edited by Bumble

  • Author

Progress update:

- Item name IDs are now accessible and editable through weapon/armor/etc tabs. Items still require a unique name id, so if you input an existing ID, L2H will generate a fitting one instead.  Before, the ID was simply the in game item name converted to lower-case, but that would be an issue if you want two items with the same name.

6DLESvD.png

- The item ID will be the one referenced in droplists, so call your item name ids something you can recognize.

- Saving now also creates and exports data to npc_pch (oops, forgot this one. I couldn't test on a server, so I didn't run into an error)

- Added more info and a simple log to the save/load screen:

PKS2hs5.png

- L2H now checks to see if you have the required files in place, before allowing you to load anything. All custom or generated files are not required before starting, as they will be created when needed.

 

I'm still thinking about the spawn approach, and I have something in mind. I don't have much time these days, so development will be a bit slower.

 

-B

On 1/26/2019 at 10:04 PM, eressea said:

 

There are two classes in L2NPC - NpcMaker and NpcMakerEx (which is derived from NpcMaker) so NpcMakerEx is maker with some extended functionality

 

I used to think that the difference between these two was the respawn time calculation but I don't think that's the case anymore.

  • Author

I may have some spare time today to work on the spawning system again.

 

Does anyone here know if it's possible to easily automate the encryption/decryption process? As the list of client files grows, it's taking some time to do it manually.

a batch file that will encrypt/decrypt all dat files inside a folder can be made, if that's what u mean by automation

 

tell me if u need help with that

Edited by sepultribe

  • Author

@sepultribe

Yes, that's what I mean. I've been doing it manually so far, but if you could show me what a batch file looks like for decrypting and encrypting from/to 413, that would be very helpful.

 

 

Edit: Does anyone know if the order of npcmakers matter in npcpos.txt? I don't think it does, but I can't test right now. I know terrains have to be made before makers, which have to be made before npcs. But other than that, it doesn't matter, right?

 

Thanks,

 

-B

Edited by Bumble

decrypt all files in folder:

for /f "usebackq delims=|" %%f in (`dir /b "%~dp0"`) do l2encdec -d %%f

 

encrypt all files in folder:

for /f "usebackq delims=|" %%f in (`dir /b "%~dp0"`) do l2encdec -e413 %%f

 

ps: we can change this to only output to encyrpted/decrypted folders, cos right now it will throw everything in the same one

 

ps2: l2encdec has to be either in the same folder as the batch file or inside system32

Edited by sepultribe

  • Author

Thanks, I'll try to play around with that.

 

Progress update:

I'm able to export domains, spawn territories, npcmaker_begin and npc_begin. I still need to export npcmaker_ex_begin and npc_ex_begin, and then I'll move on to adding spawns on them through L2H.

 

I'll need to test the new output sometime soon. Even though it looks right, there could be issues when loading it into the server.

  • Author

Progress update:

- Npcpos info can now be exported correctly. It's a different encoding than the server uses (UTF-8 vs UCS-2), but I've removed all korean symbols that should cause issues. Will need testing to see if this causes issues.

- L2H now imports original npcpos.txt when running L2H the first time, just as with npcdata and droplists. This provides the spawn areas to clone.

- Cloning an area now works, although it doesn't clone the npc spawns. This is intentional. Npc spawns will be removable, but adding them to existing original spawn areas will not be supported for a while. This is due to the AI issues mentioned earlier.

 

Next steps are to export custom areas, and allow modders to place NPCs in custom zones. All npcs placed in custom zones will be using the default_maker AI at the moment. This will be expanded on later, when I dive into AI. The majority of NPCs already use default_maker. As far as I can see, this simply means there's no extra conditions to the spawn (random, event, siege etc). The npc will be placed in the world and is accessible on server start.

 

-B

On 1/29/2019 at 6:39 PM, Bumble said:

I may have some spare time today to work on the spawning system again.

 

Does anyone here know if it's possible to easily automate the encryption/decryption process? As the list of client files grows, it's taking some time to do it manually.

l2 file encryption is extremely simple , adding it to your app might be a smoother way to do it

https://github.com/acmi/L2crypt

^ java lib for all the l2 encryptions, should be easily portable to your language of choice

  • Author
4 hours ago, Anarchy said:

l2 file encryption is extremely simple , adding it to your app might be a smoother way to do it

https://github.com/acmi/L2crypt

^ java lib for all the l2 encryptions, should be easily portable to your language of choice

Hey that's pretty cool, thanks. I may spend some time porting this to C# a bit later, it would be a lot smoother.

 

I think for now, I'll stick to the batch file, just because it's faster. I want it testable soon.

  • Author

Progress Update:

- Spawn areas are now correctly copied and renamed. An npc_maker_ex is created and attached, ready to receive npcs.

- When selected, spawn area properties can now be edited in the UI in the top right corner. You can rename areas if you want to.

- When selected, all NPC properties can now be edited in the UI below the spawn area properties.

- NPC Properties amount has been increased, now all available fields are accessible to modders. The available fields can be seen in the screenshot below:

blu0mXg.png

 

 

Today was very productive. Next step is to implement adding/removing npcs and deleting areas, and to visually represent the required/optional properties for areas and npcs. There's also a few checks I need to implement, to prevent the modder from inputting data in a wrong format.

 

-B

  • Author

Progress Update:

- Npcs can now be added to spawn areas

- A popup appears with a dropdown list of all npc name IDs. Select through dropdown or start typing to search for a specific npc name ID.

- NPCs can only be added to spawn areas that have an npc_ex_maker attached. If an area doesn't have that, clone it first. A popup will inform you of this as well.

Here's a screenshot:

rxxYy0i.png

You can see the custom zones I've created in the bottom of the spawn areas list as well.

 

Next step is removing npcs and deleting areas. This is not as horrible as deleting droplists, so it should be done faster. When that step is complete, I'll move on to testing and input-proofing the property fields. I'd also like to implement a simple encode/decode batch option. @sepultribe How would you go about placing the encoded files in different folders? Is there anywhere I can read more about this? 

 

When that's done, I'm ready to share a testable version for feedback.

 

I also have a question about Npcpos. When NPCs have a fixed position in the world, they still have 4 coordinates. X,Y,Z and a 4th coordinate. What is that 4th coordinate? I assume it's not zmin/zmax, as it's a fixed position in space. Is it orientation?

 

Thanks,

-B

Unreal Units    Degrees
    8192           45
   16384           90
   32768          180
   65536          360

 

Yeah it's orientation or yaw or rotation or whatever you want to call it.

 

to place encoded files in a folder named "enc" below the folder that the batch file resides just change the

 

do l2encdec -e413 %%f

 

to

 

do l2encdec -e413 %%f %~dp0enc\%%f

 

batch files expect the folders to exist they can't create them automatically otherwise it will throw an error

Edited by sepultribe

  • Author

Thanks @sepultribe, that works. Unfortunately, it doesn't allow spaces in the output path. For instance, my output folder is in E:\Lineage 2\L2H\enc, but running the batch file tells me that the output file is located at "E:\Lineage", which obviously results in no files. Do you know how to escape the path string?

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.