Логин  Пароль 
 запомнить меня 


Правила форума


This forum is purposed for those who's unable to speak in Russian, but still wants to take part in our products' discussion.
Since this forum is for English-speaking users, you have to speak here in English (kinda obvious, right?). All messages in any other language will be removed.

Also, you can registrate here.



Начать новую тему Ответить на тему  [ Сообщений: 17 ] 
Little scripting hint? :) 
Автор Сообщение
Новичок
Сообщений: 10

Аватар пользователя
Сообщение 21.04.2015, 12:35
Hey guys.

Its quite a hassle to make it through the registration process, but google translator helped. xD
Is there a chance to get a hint how to get .svr scripts to work?

Do i need to compile them first somehow? And where do i need to store them?

Currently i have a mod folder which is set active in the ModCFG.txt.
The changes i made to the Lang.dat file are recognized by the game, but scripts, which i placed under myMod/DATA/Script/ won't work.

Am i missing something?
Also a little script file with english explanations about the basic start processes would be awesome.

Hope i'm not asking for too much. :)

Kind regards,
socks


  
 
Сотрудник СНК-Games
Сообщений: 6359

Аватар пользователя
Символ творца. За разработку утилиты "Микроскоп", значительно облегчившей создание чемпионатных генераций КР2.

Шаман без бубна
Сообщение 21.04.2015, 18:20
iforgotmysocks :
Do i need to compile them first somehow?

Yes, you need. Compiler is here, it's called rscript. It will build .scr files and .txt files from your source. Text should go to Lang.dat, folder Script. Scripts go to yourMod/Data/Script, but you also must add paths to Main.dat (Data/Script) and CacheData (Script) for them to work.


  
 
Новичок
Сообщений: 10

Аватар пользователя
Сообщение 22.04.2015, 00:38
Ya, i tried that already. But no matter what i do, i always get an "Error : Text filename error". ^^ The fileextention is written as a lot questionmarks, so my guess is that the program isn't able to create a correct file if the systemlanguage isn't russian. But thats just a wild guess.


  
 
Сотрудник СНК-Games
Сообщений: 6359

Аватар пользователя
Символ творца. За разработку утилиты "Микроскоп", значительно облегчившей создание чемпионатных генераций КР2.

Шаман без бубна
Сообщение 22.04.2015, 08:54
iforgotmysocks :
"Error : Text filename error"

rscript gives this error when text file name is left empty. It's on Build form, Out text, field named 'rus' (it don't actually means that text must be in russian, of course, that's just default name for parameter). Btw, don't add new fields there with buttons Add or Load, it can lead to glitches.


  
 
Новичок
Сообщений: 10

Аватар пользователя
Сообщение 22.04.2015, 09:54
Ah, i see. :D
Works like a charm, thanks alot evilcoward! :)


  
 
Новичок
Сообщений: 10

Аватар пользователя
Сообщение 22.04.2015, 16:12
Hm, guess there is still a question left. :D
Should adding new parameters which are linked to the regarding script do the trick?
Or is it possible to assign more scripts to one parameter?

Like:
Main.dat:
NewParam=1,Script.ownScript
CacheData.dat:
NewParam=data\Script\ownScript.scr

This one causes the game to crash and i get those error messages:
Exception Exception with message TFileEC.Open. FileName=
Exception Exception with message TFileEC.Open. FileName=

Thanks in advance for taking the time to help me out. :)


  
 
Сотрудник СНК-Games
Сообщений: 6359

Аватар пользователя
Символ творца. За разработку утилиты "Микроскоп", значительно облегчившей создание чемпионатных генераций КР2.

Шаман без бубна
Сообщение 22.04.2015, 17:18
CacheData.dat contains actual file paths, Main.dat contains paths of parameters from CacheData. So, if you have
Код:
NewParam=data\Script\ownScript.scr

in CacheData/Script, then Main.dat should have
Код:
NewParam=1,Script.NewParam


  
 
Новичок
Сообщений: 10

Аватар пользователя
Сообщение 24.04.2015, 21:10
Hm, guess i'm still missing something.
I've tried everything i could think of.

1. the above way, its crashing with:
Exception Exception with message TFileEC.Open. FileName=data\Script\OwnStart.scr
Exception Exception with message TFileEC.Open. FileName=data\Script\OwnStart.scr

2. i tried to extract the scr files from scripts.pkg and repack them with mine and replacing them in the game dir, still doesn't work.

3. i tried to use the test.scr, thats already implemented, but that also didn't work. ^^

If its an error in the actuall script... i don't know much about the script editor itself yet, but i tried almost 10 scripts that are created by ppl who seem to know what they are doing, still nothing.

Gonna get nuts soon. :D


  
 
Сотрудник СНК-Games
Сообщений: 6359

Аватар пользователя
Символ творца. За разработку утилиты "Микроскоп", значительно облегчившей создание чемпионатных генераций КР2.

Шаман без бубна
Сообщение 24.04.2015, 21:33
iforgotmysocks :
Exception Exception with message TFileEC.Open. FileName=data\Script\OwnStart.scr

This is not an error in script, this is an error while trying to open script file. You don't have to pack your script into pkg, you can create folder Script inside Data and put it there (it actually tells you this path in error log, "data\Script\OwnStart.scr"). Btw, if you have steam version it's useless to repack original pkg-s, as steam will redownload them every time (unless you go offline mode or turn it off completely). You can pack them to your own pkg and use it as mod tho.


  
 
Новичок
Сообщений: 10

Аватар пользователя
Сообщение 24.04.2015, 21:53
Ya, as i mentioned, that's what i tried first multiple times. ^^
Trying to pack it as spk was just the last idea i had left.

I followed all the steps in all posts above, but somehow it seems to hate me. ^^


  
 
Сотрудник СНК-Games
Сообщений: 6359

Аватар пользователя
Символ творца. За разработку утилиты "Микроскоп", значительно облегчившей создание чемпионатных генераций КР2.

Шаман без бубна
Сообщение 24.04.2015, 22:10
Well, if you attach your files to post i will check what is wrong with them.


  
 
Новичок
Сообщений: 10

Аватар пользователя
Сообщение 24.04.2015, 22:58
Thanks alot! :D

https://www.dropbox.com/s/c6yb7qvsfv8dqsl/OwnStart.zip?dl=0


  
 
Сотрудник СНК-Games
Сообщений: 6359

Аватар пользователя
Символ творца. За разработку утилиты "Микроскоп", значительно облегчившей создание чемпионатных генераций КР2.

Шаман без бубна
Сообщение 25.04.2015, 09:40
I see. Problem is - you adress your script in CacheData as if it's packed in pkg or located in Data/Script folder, but it is actually unpacked and in Mods folder. You must either provide full path (including Mods/OwnStart) or pack it and include new pkg in packages list. I'm attaching both variants of fixes.

Btw, you don't have to keep entire content of dat-files if you are not replacing originals with them. Just added/changed content is fine. And if you don't at least remove BV folders from dat-files, game will refuse to lunch as soon as new version of exe is deployed.


Вложения:
OwnStartFix2.rar [73.67 KIB]
Скачиваний: 32
OwnStartFix1.rar [73.43 KIB]
Скачиваний: 30
  
 
Новичок
Сообщений: 10

Аватар пользователя
Сообщение 25.04.2015, 10:05
That's odd, i already tried the full path, i expected that one already, but it had the same outcome. ^^
Seems i still did something wrong. Gonna check it out, thank you so much. :)

Edit: Yeah, it really works. :D
Maybe it didn't like that all the files were overwritten. :x
Thanks for your help and all the tips. :)


  
 
Новичок
Сообщений: 10

Аватар пользователя
Сообщение 25.04.2015, 20:50
Btw, is there a chance to get a collection of all available functions?
I've build some smaller scripts already, creating modules and a dialog, but there seem to exist a hell of a lot functions which aren't listed in the "insert" menu of operations. ^^

Luckly i found a russian collection of some events, so the most important events are covered i guess. ^^

Is there some summary u could share? I also wouldn't mind if functions are commented in russian or not commented at all, as long as the english function names (and maybe the params) are there. :D

But only if its not too much effort, i don't wanna bug you even more than i already have. ^^


  
 
Сотрудник СНК-Games
Сообщений: 6359

Аватар пользователя
Символ творца. За разработку утилиты "Микроскоп", значительно облегчившей создание чемпионатных генераций КР2.

Шаман без бубна
Сообщение 25.04.2015, 20:59
Check example_scripts.rar attachment (same link as one for rscript), there are aScriptFun.pas and StdFunctions files with all available script functions that are taken directly from game source. They are updated periodically (next update will probably happen next weak, after new content patch is deployed).


  
 
Новичок
Сообщений: 10

Аватар пользователя
Сообщение 25.04.2015, 21:02
Awwww, you guys are amazing. :D Looking forward to the next update.
Freakin awesome that u guys still keep updating the game. <3

Thanks. :)


  
 
Показать сообщения за:  Сортировать по:  
Начать новую тему Ответить на тему  [ Сообщений: 17 ] 
Перейти:  

Найти:

Кто сейчас на форуме

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 1


Вы не можете начинать темы
Вы не можете отвечать на сообщения
Вы не можете редактировать свои сообщения
Вы не можете удалять свои сообщения
Вы не можете добавлять вложения
©2003-2017, CHK-Games.
Правила форума | Политика приватности
Powered by slightly modified phpBB © phpBB Group
Дизайн Вячеслава Трушкина
Плюшки и фишки by Bret, zavron_lb & ru_maniac
Лучше всего смотрится в 1024x768 и выше

Почта для жалоб и уведомлений // Abuse mail: ru_maniac@snk-games.ru
Russian or English only, please. Requests in any other language will be ignored.

[ Время генерации : 0.179 с. | Запросов к БД: 41 ]