Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

[Pomocy]Potrzebuję polskiego poradnika do ICTranslator


Rekomendowane odpowiedzi

Opublikowano (edytowane)

Wieam!

Chciałbym was prosić o podanie po polsku sposoby na przekształcanie modów w pluginy IC dla ItemCraft Bukkit.

Rozumiem ok 50% z tego, ale te najważniejsze części są zbyt trudne i nie potrafię ich zrozumieć (za słabo znam angielski xD).

Abyście nie musieli szukać, to podaję post o translatowaniu modów, mam nadzieję, że ktos mi to wytłumaczy.

 

Poradnik po angielsku:

 

How to translate a mod

Note: In order to fully port a mod, you will need at least a basic understanding of java. If you can't understand the last section of this post, then you're not ready port a mod. I don't intend to hold a java for noobs lecture here. If someone else has the time for it, they can do it though and I'll link it.

 

Setting up the tools:

1.Get retro and put it in a folder

2.If you are using windows get this file maintained by @icephantom and use it instead of run.sh

3.Get the maps and put them somewhere (can be the same folder)

4.Overwrite reg.reg from retro with the new one from the qwertypower maps

5.Get ICTranslator and put it in ICPlugins folder like any other ICPlugin. Uncomment the plugin so it can start.

6.Now you need to inform ICTranslator where you put the maps and the retrosource. You do this by specifying these settings in the script before ICTranslator is started:

mcpmet - for methods.csv

mcpfie - for fields.csv

classmap - for classmap.csv

kedamet - for kedamet.csv

kedafie - for kedafie.csv

retroSource - for the java folder in your retro folder

 

You can do it using the script like this:

Code:

"mcpmet" "C:\\blah\\methods.csv" putSetting

 

Doing the translation (per mod):

1.Put your minecraft.jar (or a copy of it, or a link to it (if you are on mac/linux)) containing the mod in the retro folder

2.Run run.sh (or translate.bat if you are on windows)

3.Extract the mod into some folder (lets say "C:\blah\mod\")

4.Now you can translate as follows (either using GUI or putting this after the plugin has been loaded in the script. In the latter case you need to do it in a separate include, since the commands cannot be used until the file has been parsed and executed):

Code:

"C:\\blah\\mod\\" file "C:\\blah\\translatedmod\\" file translate1

where the former is the folder you extracted it to. The latter is where you want to have the translated mod.

 

Completing the porting

Translation is just the first phase of porting the mod. To make it work as an ICplugin you need to add/change some stuff in the java files and then compile it.

 

Things you need to do:

Create a plugin.yml file specifying the name, version and what class ItemCraft should load. Example yml file looks like this:

Code:

name: ICTranslator

main: ictranslator.Main

version: 0.1

Put this file in the root of your source folder.

Reference the libraries the ItemCraft and Craftbukkit jars.

Locate the main class. It should be named starting with "mod_" typically e.g. mod_FancyPack.

Add this import to the top of that file:

Code:

import com.asdaarg.bukkit.itemcraft.ItemCraft;

Add this method into the class:

Code:

public void ItemCraftInit(MinecraftServer ms) {

}

Then move all initialization stuff into that. (static initializers may or may not have to be moved in, you can test whether it works without first. Then move them in and remove eventual final modifiers)

There are often calls to get ids and properties out of some props file. You need to replace those with ItemCraft.getID or ItemCraft.getSetting

There are sometimes translation bugs, if there are, you need to look up the name in kedamet.csv or kedafie.csv and figure out what the correct translation is. I'd appreciate it if when you fix these notify me about them so I can update the maps.

Sometimes there are methods that simply have no server equivalent. Those should simply be commented out.

Here is an example ICplugin you can use for reference: ICNTrees.zip

Notes about method and field names:

S_unc/Pield - no corresponding mcp name i.e. user defined.

U_unc/T_unc - has corresponding mcp name i.e. its an override/implementation of a vanilla method, but probably has no server equivalent.

Q_ield/R_ield - has corresponding mcp name - This happens when a field is hidden by another.

If you find a method that is guaranteed not to be on the server side, notify me and I'll change the name to deleteme.

 

After succesfully porting a mod

 

I'd appreciate it if you could share it with us here, and a short report of any out of ordinary things you had to do to make it work. This can aid others and retranslating the same mod for the next update.

 

If you are unable to complete the porting

 

You can upload the source and let someone else have a stab at it. Even if you have no java knowledge, uploading translated mods can aid those who are java knowledgeable but can't be bothered to learn and/or do the translation process.

 

 

lub

 

 

Edytowane przez TheMouder

Lubisz To!?

 

10p V

20p V

50p X

100p X

125p X

150p X

200p X

Opublikowano (edytowane)

Tylko google tak to wytłumaczyły, że gówno sie da zrozumieć, ale ja tłumaczyłem inną wersję tego poradnika. Wiem, że google nie gryzie, to z niego mam większość informacji xD.

 

X close

Edytowane przez TheMouder

Lubisz To!?

 

10p V

20p V

50p X

100p X

125p X

150p X

200p X

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.

Zarejestruj nowe konto

Załóż nowe konto. To bardzo proste!

Zarejestruj się

Zaloguj się

Zaloguj się poniżej.

Zaloguj się
×
×
  • Dodaj nową pozycję...