• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[General] object files to slk

Status
Not open for further replies.
Level 6
Joined
Aug 12, 2010
Messages
230
how do i convert my object files to slk? i tried widgetizer but it gets me overflow error

war3 objecteditor works, but has insanely terrible text encoding.. i wish they add option to do utf8

if you have object editor 0.4 and below pls post here, they might be able to help me
 
Last edited:
Level 26
Joined
Aug 18, 2009
Messages
4,097
If you are desperate, you may take a look at http://www.hiveworkshop.com/forums/warcraft-editing-tools-277/lua-wc3binaryfile-233706/ (the application objModToSlk). You will probably face problems, however, and have to adjust it to your situation. I can provide support/consider your case.

The tool is meant to translate your objMods to slk/profile as a method of finalization. The output is not meant to be reused by the World Editor.
 
Level 6
Joined
Aug 12, 2010
Messages
230
object editor

is it possible to use slk instead of w3u w3t or w3a?

for a reason, it would be very convenient editing values in excel/notepad++ than the regular wc3 program
 
Level 6
Joined
Aug 12, 2010
Messages
230
i downloaded all the 3. how do i use it?

i managed to get up to this point:
attachment.php

now what?
 

Attachments

  • asd.png
    asd.png
    35.5 KB · Views: 676
Level 26
Joined
Aug 18, 2009
Messages
4,097
lua.exe is the interpreter. You have to start it with a lua script file in order to run the lua script. If you have installed it, it should have been added to your environment variables, so you do not have to spell out the whole path from different working directories but can do it like lua mylocalscript.lua. The advantage of using lua is that it's very simple and as an interpreted language, the code is compiled just in time, you can directly run the source code os-independent. But lua itself and its extensions first need to be installed properly to provide a base.

LuaFileSystem (lfs) is a very common extension for the lua language and well, basically deals with the filesystem on your machine. As you can read on the lfs website, you should install it with luarocks.

luarocks is a management system for the lua extensions (modules). There are binaries (self-executables) for different os, just follow the instructions. They also tell you how to add new modules, or maybe lfs is already included, dunno.

About git:

git has nothing to do with Lua but using it makes it easy for the developer of whatever to push updates for his/her published content. If you do not want to use it, you can instead download the files zipped.

Then comes my part:

The waterlua thingy is a common, globally accessable library for me, so I can import basic stuff with a simple require 'waterlua' line in every script without having to pay attention to the current working directory. Lua has a library folder, which I think is statically named lua under the Lua home path. luarocks should place its own stuff in there anyway.

And finally wc3binaryFile provides lua scripts for dealing with wc3 formats and in the applications folder are some concrete tasks. You can view/edit the .lua with a simple text editor. What you want is objModToSlk. The .bat are for convenient access. You can drag a file onto start.bat, so it will call test.lua with the file path as first argument. In test.lua, you can see that it tries to extract certain objMod files like .w3a and also the base slks from the wc3 mpq (since you probably want to keep the original object definitions).

The line objContainer:addFromDir(inputDir) picks slks, objMods and txts from the \Input directory and merges them to gain new slks, txts and maybe also objMod data that could not be converted (for example the slks possess no slots for ability data of greater than level 4).

objContainer:eek:utput(outputDir) outputs the merged data in \Output

After that. the initially presented map is copied and import commands applied.

So you are to adjust the test.lua to your needs. Like I said above, it's far from polished but I wanted to keep it general and in some points it depends on the case. I could also give you a new test.lua and insert all the objMod and slks paths. Another thing is that the .txt files (profile files) are coupled to your wc3 language. By converting objMods to profile, I have to at least overwrite one of those .txt, or if you edit an original object, I should overwrite the .txt that contains information for this object. The affected .txt therefore are now read from the map rather than the standard mpqs and the language is fixed.

Ps: Is that Windows XP?
 
Last edited:
Level 6
Joined
Aug 12, 2010
Messages
230
attachment.php


it is weird..the installer.bat stops and closes after that.
 

Attachments

  • asd.png
    asd.png
    15.6 KB · Views: 583
Level 26
Joined
Aug 18, 2009
Messages
4,097
I said that luarocks manages extension modules for lua, not that it replaces the lua basic files.

1. First install/copy plain Lua
2. install luarocks
3. add lfs via luarocks
4. download waterlua and put it in \lua subfolder of the Lua directory
5. download wc3binaryFile and put it where you want

edit: or pick https://code.google.com/p/luaforwindows/ <- compiled version for windows that already has lfs and other common libraries included, so you won't even need luarocks
 
Status
Not open for further replies.
Top