Topic: Punkroku area

I found this link http://awesome.naquadah.org/wiki/Google_Translate and I am wondering if there is a module to automatically translate lines before printing them to screen using the google translate api?

Wordpress should have auto translate to for forums.

Я нашел эту ссылку http://awesome.naquadah.org/wiki/Google_Translate и мне интересно, если есть модуль для автоматического перевода строки до вывода их в экран с помощью Google Translate API?

Wordpress должны были перевести на авто для форумов.

2 (edited by Punkroku 2013-08-22 10:57:44)

Re: Punkroku area

I tried to create .lua loader and it doesn't work loading .IDF files.

I think it is best to update launcher code for this rather than creating main.lua and a directory with the *.idf file.

PS> For now, I can load with f4 no need for parameter.

The same should be done for .QST files in the URQL. I am having another issue there. Trying to return from lurq() and/or loading a new .qst file from a qst file. Example after hamster1.qst load hamster2.qst.

Maybe you can make a break button to return from a .qst file using URQ module function lurq(gamename.qst);

PSS> .QSZ this zip qst format is not supported either.

Thank you good work I like instead and will try to develop a game.

Re: Punkroku area

Punkroku, we can't understand what do you need to be happy.
What do you mean sayd that >

I tried to create .lua loader and it doesn't work loading .IDF files.
I think it is best to update launcher code for this rather than creating main.lua and a directory with the *.idf file.

INSTEAD knows idf 'coz it mean I-nstead D-ata F-iles

If you want to open games or some other stuff via INSTEAD <menu> and INSTEAD <open dialog> you need to put archive with game files in directory (depending on OS that you use) that all games stored by INSTEAD, or you just need to open archive file via INSTEAD and it unpack all files that it needs in that place that's suits for it.
By the way what version of INSTEAD do you use?

about that

The same should be done for .QST files in the URQL. I am having another issue there. Trying to return from lurq() and/or loading a new .qst file from a qst file. Example after hamster1.qst load hamster2.qst.
Maybe you can make a break button to return from a .qst file using URQ module function lurq(gamename.qst);
PSS> .QSZ this zip qst format is not supported either.

INSTEAD is cycle at all. But interpretation of .qst .urq or some else text games formats is made by Peter (Viva de la Instead!) just for lulz or like an experiment and show of INSTEAD power.
But, maybe I didn't catch your idea and if you can try to explain what you say more detalized.

Qui habet aures audiendi, audiat...

Re: Punkroku area

Sounds good, by the way can you write and debug some module that were works well with instead and makes translations when them needed in games?

Qui habet aures audiendi, audiat...

Re: Punkroku area

Here I am trying to load .qst files with urq module using the function lurq which does not return unless not file:main.lua

-- $Name: Semyon The Hamster Loader$
-- $Name(en): Semyon Loader$
-- $Name(ru): Semyon Loader$
-- $Version: v0.2beta$
game.codepage="CP1251"

--disable(instead.isEnableSave);--Disable saving and autosaving
--disable(instead.isEnableAutosave); --I don't want to autoload.
--game.forcedsc = true;


--FOR ALL OTHER LANGUAGES DEFAULT TEXT
game.dsc = [[NEED TRANSLATION HERE LANG_ENG^^
Нуждается в переводе здесь LANG_ru^^
Besoin d'une traduction ICI LANG_fr^^
BISOGNO DI TRADUZIONE QUI LANG_it^^
Need vertaling hier LANG_dutch^^
Brauchen Übersetzung hier LANG_german^^
Necesita traducción aquí LANG_spanish^^
ここで翻訳を必要とする LANG_jap
]];

main = room {
    nam = 'Semyon the Hamster Loader',
    dsc = function (s)
      if LANG=='en' then 
        return 'This is a URQL .qst file loader so you can play games using the Universal RipOs/Ripsoft Quest Language and the URQ Module for Instead.';
      --elseAdd other languages here if not game.dsc will print need translation...  
      --end
      end
    end,
    obj =  { obj {
            nam = 'Load Hamster Game', dsc = '> {Hamster QST 1}', 
            act = function (s) --This allows you to launch qst from lua script. 
                dofile '../urq/urq.lua'  -----------------------------------------
                lurq '/exampleQst/hamster1.qst'  -----------------------
            end,--This allows you to launch qst from lua script. --------------
          }, 
        obj {
            nam = 'Игры_game', dsc = '^> {Hamster QST 2}',
            act = function (s) --This allows you to launch qst from lua script. 
                dofile '../urq/urq.lua'  -----------------------------------------
                lurq '/exampleQst/hamster2.qst'  -----------------------
            end,--This allows you to launch qst from lua script. --------------
          } 
        }
}

--lurq 'hamster1.qst' I would do it this way I can return from lurq if not file????
--lurq 'hamster2.qst' 

Re: Punkroku area

I tried to make a IDF file loader but I do not know the function called when IDF is passed as a parameter:
FILE main.lua in Satori directory with Satori.idf

-- $Name: Satori Loader$
-- $Name(ru):Satori Игры$
-- $Version:1.0.0$

dofile 'satori.idf' --I wish this was that easy. But dofile does not handle .idf type??

PS>
I also want to disable autosave and autoload when making a loader.

7 (edited by Punkroku 2013-08-23 06:45:43)

Re: Punkroku area

I also translated URQ module I have no reference for the urq. When I load hamster.qst this way I need to press f5 to refresh the game since the game screen is blank.
urq/main.lua

-- $Name:URQ Module$
-- $Name(ru):Модуль URQ$
-- $Version:1.9.7$

--disableautosave --guess for disable autosaving and loading 
game.enable_autosave = false;
game.enable_save = false;
--game.forcedsc = true; --To force pressing description?

main = room {
    nam = 'URQ v1.9.7';
    pic = '\\img\\instead.png';
    dsc = function(s)
        if LANG == 'ru' then
        pn (txtc(txtu(txtnb[[Этот компонент не является игрой!]])))
        pn ()
        pn [[ Модуль URQ позволяет играть в квесты, написанные на URQL.]]
        pn ()
        pn [[ http://instead.syscall.ru ]]
        pn [[ http://instead.googlecode.com ]]
        pn ()
        pn (txtc(txtb[[ Информация для разработчиков и опытных пользователей: ]]))
        pn ()
        pn [[ Для того, чтобы самостоятельно добавить URQ игру в INSTEAD Вам необходимо: ]]
        pn ()
        pn [[1) Распаковать игру в отдельный каталог в каталоге с играми для INSTEAD.]]
        pn ()
        pn [[2) Добавить в каталог с игрой файл 'main.lua' с следующим содержимым:]]
        pn ()
        pn (txtnb(" ")..[[-- $Name: Название игры в кодировке UTF-8$]])
        pn (txtnb(" ")..[[dofile "../urq/urq.lua"]])
        pn (txtnb(" ")..[[lurq "имя_файла.qst"]])
        pn ()
        pn [[3) При необходимости, провести дополнительную настройку модуля. Для этого
        перед командой lurq (загрузка URQ квеста) можно задать следующие параметры:]]
        pn ()
        pn (txtl[[ urq.extension_strings = false -- не поддерживать строковое расширение;]])
        pn ()
        pn (txtl[[ urq.extension_furq = false -- не поддерживать расширения FireURQ;]])
        pn ()
        pn (txtl[[ urq.extension_global_else = true -- перед оператором else не нужен разделитель;]])
        pn ()
        pn (txtl[[ urq.extension_print_spaces = true -- не убирать пробелы перед строкой в операторах p/pln;]])
        pn ()
        pn (txtl[[ urq.extension_input = false -- не поддерживать ввод и pause;]])
        pn ()
        pn (txtl[[ urq.extension_useinv = true -- поддерживать операцию "осмотреть инвентарь";]])
        pn ()
        pn (txtl[[ urq.extension_invproc = true -- вызывать код локации еще раз при использовании инвентаря;]])
        pn ()
        pn (txtl[[ urq.extension_varimage = false -- не поддерживать переменную image;]])
        pn ()
        pn (txtl[[ urq.extension_loccnt = false -- не поддерживать count_ (вместо этого, работать в стиле ripos urq);]])
        pn ()
        pn (txtl[[ urq.extension_loccnt_btn = false -- изменять счетчики посещений локаций не только в btn но и 
            в любых переходах;]])
        pn (txtl[[ urq.extension_pause_btn = false -- не показывать кнопки во время пауз;]])
        pn ()
        pn (txtl[[ urq.extension_input_btn = true -- показывать кнопки во время ввода;]])
        pn ()
        pn (txtl([[ game.codepage="CP866" -- для игр в DOS кодировке.]]))
        pn ()
        pn (txtem[[При возникновении проблем с запуском URQ игр, обращайтесь на наш форум: http://instead.syscall.ru/forum]])
        pn ()
        pn (txtr("INSTEAD 2009-2013")) --Date updated to 2013
        else if LANG == 'en' then
        --THIS IS FOR THE ENGLISH TRANSLATION thx to google translate
        pn (txtc (txtu (txtnb [[This component is not a game!]])))
        pn ()
        pn [[URQ This module allows you to play quests, written in Universal RipOs/Ripsoft Quest Language (URQL).]] --Which is it RipOs or Ripsoft?
        pn ()
        pn [[http://instead.syscall.ru]]
        pn [[http://instead.googlecode.com]]
        pn ()
        pn (txtc (txtb [[Information for developers and advanced users:]]))
        pn ()
        pn [[If you want to play a URQ game in INSTEAD you must:]]
        pn ()
        pn [[1) Unzip the game in a separate directory in the directory with games for INSTEAD.]]
        pn ()
        pn [[2) In the directory with the game file add 'main.lua' with the following contents:]]
        pn ()
        pn (txtnb ("") .. [[- $ Name: Name of the game in UTF-8 $]])
        pn (txtnb ("") .. [[dofile ".. / urq / urq.lua"]])
        pn (txtnb ("") .. [[lurq "imya_fayla.qst or your_quest.qst Note: .qsz files are not supported but you can unzip them."]])
        pn ()
        pn [[3) If it is necessary, to add an additional setup module. The lurq team (download URQ Quest) has the following parameters:]]
        pn ()
        pn (txtl [[urq.extension_strings = false - do not support the expansion of the string;]])
        pn ()
        pn (txtl [[urq.extension_furq = false - do not support the expansion FireURQ;]])
        pn ()
        pn (txtl [[urq.extension_global_else = true - else before the operator does not need a divider;]])
        pn ()
        pn (txtl [[urq.extension_print_spaces = true - not to remove the spaces in the front of the line operators p / pln;]])
        pn ()
        pn (txtl [[urq.extension_input = false - do not support the input and pause;]])
        pn ()
        pn (txtl [[urq.extension_useinv = true - to support the operation "view inventory";]])
        pn ()
        pn (txtl [[urq.extension_invproc = true - call code location again using equipment;]])
        pn ()
        pn (txtl [[urq.extension_varimage = false - do not support variable image;]])
        pn ()
        pn (txtl [[urq.extension_loccnt = false - not to support count_ (instead, to work in the style of ripos urq);]])
        pn ()
        pn (txtl [[urq.extension_loccnt_btn = false - change counters visits locations not only in but also btn in any transitions;]])
        pn (txtl [[urq.extension_pause_btn = false - skip button during breaks;]])
        pn ()
        pn (txtl [[urq.extension_input_btn = true - show the button while entering;]])
        pn ()
        pn (txtl ([[game.codepage = "CP866" - for games in the DOS character set.]]))
        pn ()
        pn (txtem [[If you have problems running URQ games, go to our forum: http://instead.syscall.ru/forum]])
        pn ()
        pn (txtr ("INSTEAD 2009-2013"))
             else
            --FOR ALL OTHER LANGUAGES DEFAULT TEXT
            pn [[NEED TRANSLATION HERE LANG_ENG^^Нуждается в переводе здесь LANG_ru^^Besoin d'une traduction ICI LANG_fr^^BISOGNO DI TRADUZIONE QUI LANG_it^^Need vertaling hier LANG_dutch^^Brauchen Übersetzung hier LANG_german^^Necesita traducción aquí LANG_spanish^^ここで翻訳を必要とする LANG_jap
]]
             end
        end
    end,
    obj = {
        obj {
            nam = 'Игры_game', dsc = '> {Игры_game sample click then press f5}', --bug need to press f5 to refresh?? 
            act = function (s) --This allows you to launch qst from lua script.
                dofile'urq.lua'; -----------------------------------------
                urq.extension_input_btn = true;  --I don't know whats this
                 lurq 'exampleQst/hamster.qst';   -------------------------
            end,--This allows you to launch qst from lua script. -------------
        };
    }
};
Post's attachments

Attachment icon urq1.91ENGpatch.zip 19.1 kb, 162 downloads since 2013-08-23 

8 (edited by Punkroku 2013-08-23 02:38:42)

Re: Punkroku area

I need to look at the debug functions. I do not know how to debug my games yet.
I type
require 'dbg'
but I don't know the functions I can use to debug or how to debug yet. No ENGLISH translation I can find for debugging.

I also thought of a good way to translate game for now. I translate whole .lua file and use openoffice/libreoffic to approve changes manually. Right click approve.

Re: Punkroku area

The English translation of the "dbg" module is here:
http://instead.syscall.ru/wiki/en/gamedev/modules/dbg

Examples

In game with the module included click the debug object in the inventory or press F7 key.

Re: Punkroku area

By the way what version of INSTEAD do you use?

The launcher is 0.6.1 and does not discover .idf files. I can pass as a parameter. I do not know the code or function in Instead code to load an .idf from main.lua the example. Also the .idf files don't show in games list.

The version of Instead is 1.9.1. The issue is with the Instead Launcher. 

dofile 'satori.idf'    :( This doesn't work the function dofile isn't overloaded to handle .idf files

Now for .qst files I cannot quit or return from a .qst file. the function lurq only returns when not file (No file loaded).

I would like to return so I can load multiple qst files ex:

lurq 'hamster1.qst'
lurq 'hamster2.qst'
lurq 'ballad.qst'  
...etc

Re: Punkroku area

The English translation of the "dbg" module is here:
http://instead.syscall.ru/wiki/en/gamedev/modules/dbg

Thank you now I can start using debug... i still have a issue with call to local v i will post new topic.

Sounds good, by the way can you write and debug some module that were works well with instead and makes translations when them needed in games?

I hope that I could do that one day. For now, I am learning lua. and trying to debug lots of problems. I can't decide when to use comma semicolon or nothing... The idea to translate with google and openoffice did not work. I over estimated the compare function in open office. It treats the entire document as a change.  hmm

Re: Punkroku area

1) idf is not supported by launcher yet, but idf can be start from instead itself (press f4) or from command line: instead something.idf
2) qst files are for Russian only old engine, that used in some games. Instead can play some of them, but the gameplay is much differ and Urq module can not work with instead style game, so, i am not sure that you qst autoloader can work.  Anyway, there are a lot of URQ dialects, so, the manual work is still needed to adopt urq game in instead (using switchwes);
3) dofile "*.idf" is not work, idf can be loaded only by instead itself.

Re: Punkroku area

In my new game I have lots of problems.  I would  post the code but I don't want to spoil the game idea yet.

Error while processing game:
./stead//stead.lua:841: attempt to index local 'v' (a string value)

stack traceback:
./stead//stead.lua:841 in function 'list'
./stead//stead.lua:1013 in function 'room'
hanoiingpizza.lua:53 in main chunk
[C]: in function 'dofile'
./stead//stead.lua:2035: in function 'gamereset'
./stead//stead.lua:2046: in function gamefile
[string "gamefile('hanoiingpizza.lua', true)"]:1: in function '?'
./stead//stead.lua:879 in function 'call'
....Instead/instead-kit-1.9.1/./stead//object.lua:3...'

Post's attachments

Attachment icon hanoiingpizza_broken.zip 3.21 mb, 2 downloads since 2013-08-23 

Re: Punkroku area

I think I am confused on when to terminate with comma semicolon or nothing...
I bet this is simple for someone else...

Re: Punkroku area

Punkroku, its sad to say, but the main problem is lack of english documentation.
May be you will try to translate from russian and write english version on wiki?

I see the code and found the legacy. Of course, its not your problem. Problem, is that you use legacy code from some games.

For example, currently, there is already module called proxymenu, and no need in legacy and terrible menu.lua....

Here is actual documentation n Russian sad
http://instead.syscall.ru/wiki/ru/gamedev/documentation

And here are modules:

http://instead.syscall.ru/wiki/ru/gamedev/modules

And here is proxymenu:
http://instead.syscall.ru/wiki/ru/gamed … /proxymenu

BTW, the problem in code is that way is not list {}.
way = 'main1', should way = { 'main1' }

But the best way is to translate documentation or, at least, look this code: http://download.sourceforge.net/project … -0.3.0.zip

Re: Punkroku area

Is there a way to overload dofile to act as the function which instead engine loads this way it handles the .idf type? Or just update the launcher to find idf file.  Would that be simpler?

Re: Punkroku area

Is there a way to overload dofile to act as the function which instead engine loads this way it handles the .idf type? Or just update the launcher to find idf file.  Would that be simpler?

PS. Look at my code I think I have errors writing it.
Notice the semicolons and commas is this right??!
Also I get an error that the qst doesn't show until I press f5 to refresh.

obj = {
        obj {
            nam = 'Игры_game', dsc = '> {Игры_game sample click then press f5}', --bug need to press f5 to refresh??
            act = function (s) --This allows you to launch qst from lua script.
                dofile'urq.lua'; -----------------------------------------
                urq.extension_input_btn = true;  --I don't know whats this
                 lurq 'exampleQst/hamster.qst';   -------------------------
            end,--This allows you to launch qst from lua script. -------------
        };
    }
};

Re: Punkroku area

Thank you  smile

Re: Punkroku area

dofile is not save-safe. Saving of lua state is not transparent, engine make a lot of efforts to make save/load feature. You may use gamefile as save-safe. In fact, i think it is still possible to make qst loader, by patching urq.lua, but it is not really necessary, because we just use urq module to easy porting of URQ games. But anyway, may be i will try do it myself later. Currently, i think it is bad idea to begin to dig INSTEAD internals, the better way is documentation. smile

Re: Punkroku area

I like the easy porting of URQ idea better. Good Idea.

If not, maybe the URQ module can have a button in Instead to return to laucher/terminate lurq function? That is what I was trying to see with the line:

urq.extension_input_btn = true;  --I don't know whats this

21 (edited by Punkroku 2013-08-25 07:01:11)

Re: Punkroku area

[center]http://instead.syscall.ru/forum/misc.php?action=pun_attachment&amp;item=848&amp;download=0[/center]

I am working on a new theme... I wanted animations for cursor but if I use .gif the animation write write write but no replace...

I want to move the menu is there a way to move menu to the right.

I want to add animations either png with offset or gif. Png animation is cleaner nicer looking.

Pls, look at my animation attempts in theme folder.

Here is my first version theme.  cool

Most graphics are original except for fairy menu button edited from comic book... I will try to make a simpler game then go back to my annoying pizza project game... That has lots of bugs. I think cause I am using gedit in ubuntu I get txt errors???

Post's attachments

Attachment icon legend.jpg 36.85 kb, 135 downloads since 2013-08-25 

Attachment icon Legend_gimpfiles.zip 89.86 kb, 162 downloads since 2013-08-25 

Attachment icon legend_themev1.01.zip 900.71 kb, 163 downloads since 2013-08-25 

Re: Punkroku area

I updated comments for Instead

; $Name:Legend$
; $Name(ru):легенда$
; $Name(fr):Légende$
; $Name(es):Legion$
; $Name(it):Leggenda$
; $Name(jp):伝説$

Re: Punkroku area

Looks good. Nice work.

24 (edited by Punkroku 2013-08-25 10:23:29)

Re: Punkroku area

This theme is not finished still.

I need some help still.... I want to use animations with cursors but have problems. Is this supported? Can I specify an offset for png arrays. The animated gif cause a problem and leave pictures from last frame onscreen. Combines but not replace.

I also want to use the click command to bring up the menu click = ...etc, is there a function to call in the .lua that will bring up the menu. This way if someone clicks on the Triangle in the bottom middle that will also bring up the menu like when you click on the fairy.

Lastly, I want to move the menu to the right.

And I am considering fonts. I saw that you can put a list of fonts!  That is cool ex.

in theme.ini

win.fnt.name = {fontname1,font2,font3,font4}.ttf
inv.fnt.name = {fontname1,font2,font3,font4}.ttf
menu.fnt.name = {fontname1,font2,font3,font4}.ttf

Free sample fonts to try....

Post's attachments

Attachment icon fonts.zip 86.49 kb, 167 downloads since 2013-08-25 

25 (edited by Punkroku 2013-08-25 12:36:36)

Re: Punkroku area

Line 27 I think problem is casting integer to string  edit: do this like tostring(indpum)

p ""..img(""..indpnum..'.png');

I also tried p''..img(''..indpnum..'.png');
Any ideas??

Can I do this?? I am getting error maybe this is prob.???

game.nam  = '';
game.dsc = '';
game.pic = 'instead.png';

main.lua

-- $Name:Tesuto$
instead_version "1.6.0"

game.forcedsc = true;
--game.nam  = '';
game.act = 'You can\'t.';
game.inv = "Hmm... Wrong...";
game.use = 'Won\'t work...';
--game.dsc = '';
--game.pic = 'instead.png';

main = room {
    nam = '',
    dsc = ''..img('1.png');
    act = function(s)
        walk('r1');
    end,
};


r1 = room {
    indpnum = 1;
    enter = function(s)
        indpnum = indpnum +1;
    end,
    act = function(s)
        p ""..img(""..indpnum..'.png');  --THIS IS LINE 27
        walk('r2');
    end,
    click = function(s, x, y)
        return "You clicked at "..x..','..y..'.';
    end,

};

r2 = room {
    enter = function(s)
        r1.indpnum = r1.indpnum +1;
    end,
    act = function(s)
        p ""..img(""..r1.indpnum..'.png');
        walk('r1');
    end,
    click = function(s, x, y)
        return "You clicked a picture at "..x..','..y..'.';
    end,

};

--Experiment with new and delete to dynamically create a picture loader file. Until not file.