Scripting and Customizing??

Started by JuicyAngel, Feb 21, 2009, 01:41 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JuicyAngel

Can someone please post here guide on how to script and link for any program i might need to get started
with scripting and also custome scripting anything that useful for 1st time people who wants to learn.
I would highly appreciate that thank you very much for your time.

Tira

Quote from: JuicyAngel on Feb 21, 2009, 01:41 AM
scripting

Notepad and script_commands.doc. Read it. Provided you have some kind of prior programming knowledge, it should take about 0.2 seconds. If not, it's still about five minutes to pick up the basics. Just open up some default eA scripts and reverse engineer them - to be honest, that's generally the easiest way to learn any language.

I'm assuming by custom scripting you meant custom spriting? If so, you basically need Paint, a sprite compiler (I personally favour SprConview) and possibly an .act editor if you don't plan to use existing ones (actOR/actOR is the only option here).

Sprite creation guides:

http://wiki.ro-enhance.net/index.php?title=Category:Spriting_%26_Paletting


JuicyAngel

i meant like putting sprite pictures in custom script weapons or items i make

Cielte

Well, google is your friend, but of course, not many use it. Tried searching eAthena yet? I'm sure it could yield some results.

Tira

Quote from: JuicyAngel on Feb 21, 2009, 05:35 PM
i meant like putting sprite pictures in custom script weapons or items i make

Already wrote a guide on this for someone at eA, so just gonna copy paste for you:

Okay. Here goes your explanation.

First of all, you're concerned with the following folders:


  • sprite/¾ÆÀÌÃ...Û
  • sprite/¾Ç¼¼»ç¸®/¿©
  • sprite/¾Ç¼¼»ç¸®/³²
  • texture/À¯ÀúÀÎÃ...ÍÆäÀ̽º/collection
  • texture/À¯ÀúÀÎÃ...ÍÆäÀ̽º/item
Those are the main folders you'll be editing/adding to (exceptions are custom mobs, custom NPCs, custom weapons, etc. - but all headgear items and regular items will go in here).

In order:

sprite/¾ÆÀÌÃ...Û

This is the location of drop sprites - usually a single frame sprite, with a more or less universal .act file - since all these have to do is sit on the ground.

sprite/¾Ç¼¼»ç¸®/¿© & sprite/¾Ç¼¼»ç¸®/³²

This is the location of equip sprites - basically what shows on a character (with the exception of weapon sprites and shield sprites). This is mostly going to be related to custom headgears, and is directly related to visionary_tab.txt - the filename of the sprites you add to these two folders has to correspond to the entry in visionary_tab (i.e. if you added somesprite.spr and somesprite.act, you'd add _somesprite to your visionary_tab). The two folders correspond to male and female respectively.

texture/À¯ÀúÀÎÃ...ÍÆäÀ̽º/collection

The collection image of your sprite. Should be 75x100 bmp format - and corresponds to idnum2itemresnametable.txt (and num2itemresnametable.txt).

texture/À¯ÀúÀÎÃ...ÍÆäÀ̽º/item

The inventory icon of your sprite, also corresponds to resnametables. Should be 24x24 bmp, transparent colour is #FF00FF.

Okay. So those are the main folders you need to add to. Now the files themselves that tell each what to do/where to go.

First of all, just name all the files for one item as the same filename - it will cut down confusion dramatically, even though it's not necessary.


  • num2itemdesctable.txt / idnum2itemdesctable.txt
  • num2itemdisplaynametable.txt / idnum2itemdisplaynametable.txt
  • num2itemresnametable.txt / idnum2itemresnametable.txt
  • itemslotcounttable.txt
  • visionary_tab.txt
Those are the files you'll be editing/adding to (with the exception of maybe slotcounttable).

num2itemdesctable.txt / idnum2itemdesctable.txt

This determines the description of the item you're adding (fairly self-explanatory).

num2itemdisplaynametable.txt / idnum2itemdisplaynametable.txt

Determines the inventory name of the item.

num2itemresnametable.txt / idnum2itemresnametable.txt

Determines which filename to use for collection/item images. So whatever you add in here, your client will look for the corresponding .bmp files  to display. In other words, really important. This has no relation to equip sprites whatsoever, and is completely unrelated to visionary_tab. If you're adding generic items (i.e. armour, shoes, miscellaneous customs, usable items, etc. with new sprites, this is the only file you'll need to be concerned with).

itemslotcounttable.txt

Determines how many slots are displayed on the item. If an item has a slot but isn't listed as slotted in here, it will still have the slot (obviously), but it won't be displayed client side (invisible slot, if you like).

visionary_tab.txt

Okay. This is your most important file in terms of adding most customs. The format of the file (i.e. which line your item is listed on) determines the view ID. Example is easiest to make this obvious:

!800
_flowerring
_haneribbon
_roboheadphones
_roboheadset
_musicring
_rosering
_backpack


That's a sample of my visionary_tab. This set of my customs are starting from view ID 800 (hence the !800 at the top). Anything below that number starts from 800 and increases. So view ID 801 would display haneribbon, view ID 805 would display rosering, etc. This relates to your item_db - whatever view ID you have listed there will be determined client side by this file. It's only concerned with equip sprites (i.e. what's actually shown on your character), NOTHING else.

So, with that said, I'll do a full run through of adding a sample custom item, so you get the complete idea.

Say I make:

20001,Some_Headgear,Some Headgear,5,20,,500,,2,,1,0xFFFFFFFF,7,2,256,,1,1,800,{},{},{}

Okay. So we have item ID 20001 and view ID 800. First of all, we need to add sprites. If we have someheadgear.act and someheadgear.spr for our drop sprites, we'll throw those in sprite/¾ÆÀÌÃ...Û. Next we need to deal with the equip sprites - we need to put ¿©_someheadgear.act and ¿©_someheadgear.spr in sprite/¾Ç¼¼»ç¸®/¿© (female) and ³²_someheadgear.act and ³²_someheadgear.spr in sprite/¾Ç¼¼»ç¸®/³² (male). We then want a description image and inventory image (see above) in texture/À¯ÀúÀÎÃ...ÍÆäÀ̽º/collection and texture/À¯ÀúÀÎÃ...ÍÆäÀ̽º/item respectively.

All sprites are added now, but the client needs to know what to do with them (and it still doesn't know what view ID 800 is).

In num2itemdesctable.txt / idnum2itemdesctable.txt:

20001#
Some random headgear.
Class :^777777 Headgear^000000
Defense :^777777 2^000000
Equipped On :^777777 Upper^000000
Weight :^777777 50^000000
Applicable Job :^777777 Every Job^000000
#


In num2itemdisplaynametable.txt / idnum2itemdisplaynametable.txt:

20001#Some_Headgear# // Underscore denotes space.

In num2itemresnametable.txt / idnum2itemresnametable.txt:

20001#someheadgear# // Tells client what filenames to look for in related folders.

In itemslotcounttable.txt:

20001#1# // Because I gave it a slot.

In visionary_tab.txt:

!800
_someheadgear


All done. That's all you need to know, essentially. The other sprite folders are related to other types of sprite (i.e. monstrosity_tab.txt is related to mob sprites, which go in sprite/¸ó½ºÃ...Í, and also to NPCs (which use the bottom range of view IDs) which go in sprite/npc, etc.).

As for your Valk Shield issue, you evidently lack a drop sprite. According to resnametable:

2115#¹ßÃ...°¸®¾Æ½¯µå#

Which means you need a drop sprite and .act with that filename (¹ßÃ...°¸®¾Æ½¯µå.spr / .act) in your sprite/¾ÆÀÌÃ...Û folder to fix it. Although you should have one by default, so I dunno what's up with that.

Hopefully that explains things in a little more detail.


Note: doesn't cover custom weapon sprite implementation. But get to grips with the basics first, since it's a bit more complicated.