STALKERSOUP


Everything about the STALKERSOUP game...
 
HomeFAQRegisterLog in
Log in
Username:
Password:
Log in automatically: 
:: I forgot my password
Latest topics
» NPP1 - Ghost won't move
by Blind_doge Today at 1:53

» The '100 Rads' bar...
by chucksar Yesterday at 19:08

» Disappearing transitions
by pchester Thu 23 Nov 2017 - 12:10

» Those morons Huck and Chuck...
by nemisis1842khann Wed 22 Nov 2017 - 20:03

» Monolithian Teleporter...
by Nokoyou Tue 21 Nov 2017 - 23:42

» Flasks and containers...
by Nokoyou Tue 21 Nov 2017 - 23:40

» Getting the PDA from Bolt, the mercenary
by yusufhamdan Tue 21 Nov 2017 - 17:05

» How do I get inside the Fiery Cave?...
by Nokoyou Mon 20 Nov 2017 - 22:26

November 2017
MonTueWedThuFriSatSun
  12345
6789101112
13141516171819
20212223242526
27282930   
CalendarCalendar
Top posting users this week
pchester
 
Nokoyou
 
Blind_doge
 
identical123
 
Sword2012
 
Rat Catcher
 
yusufhamdan
 
nemisis1842khann
 
chucksar
 
kaplumbaga
 
Statistics
We have 265 registered users
The newest registered user is patmartins

Our users have posted a total of 3090 messages in 311 subjects
Who is online?
In total there are 2 users online :: 0 Registered, 0 Hidden and 2 Guests

None

Most users ever online was 22 on Fri 13 Oct 2017 - 10:55

Share | 
 

 LUA related issues

View previous topic View next topic Go down 
AuthorMessage
rusty_shackleford
Experienced
avatar

Posts : 64
Join date : 2017-07-17
Location : California

PostSubject: LUA related issues   Fri 21 Jul 2017 - 3:38

This is really just for TB3D/Aleks

Code:
function has_30_money(first_speaker, second_speaker)
 return first_speaker:money() >= 30
end


function not_has_30_money(first_speaker, second_speaker)
 return first_speaker:money() < 30
end


function give_30_money_to_stalker_for_info_about_ratcatcher(first_speaker, second_speaker)
 first_speaker:transfer_money(30, second_speaker)
end

Just why? After looking through a lot of these scripts it seems to me like there needs to be a lot more standardization before the mod can be truly called 'stable' for developers.

EDIT: Is this just AMK? After looking after the dialogue files it looks like you can't actually specify any arguments, and that looks like why it was like this.
Back to top Go down
Steve90k
Moderator
avatar

Posts : 156
Join date : 2017-06-02

PostSubject: Re: LUA related issues   Fri 21 Jul 2017 - 18:13

[You must be registered and logged in to see this link.] wrote:
This is really just for TB3D/Aleks

Code:
function has_30_money(first_speaker, second_speaker)
 return first_speaker:money() >= 30
end


function not_has_30_money(first_speaker, second_speaker)
 return first_speaker:money() < 30
end


function give_30_money_to_stalker_for_info_about_ratcatcher(first_speaker, second_speaker)
 first_speaker:transfer_money(30, second_speaker)
end

Just why? After looking through a lot of these scripts it seems to me like there needs to be a lot more standardization before the mod can be truly called 'stable' for developers.

EDIT: Is this just AMK? After looking after the dialogue files it looks like you can't actually specify any arguments, and that looks like why it was like this.


lol, do you want to fix some mission scripts? we have a few of them you could fix!!!
Back to top Go down
TecnoBacon
Administrator
avatar

Posts : 47
Join date : 2017-06-01
Location : USA

PostSubject: Re: LUA related issues   Fri 21 Jul 2017 - 20:28

these and other scripts were written that way as they are accessed from dialogs which makes it faster by doing them that way
Back to top Go down
http://tecnobacon.com
TecnoBacon
Administrator
avatar

Posts : 47
Join date : 2017-06-01
Location : USA

PostSubject: Re: LUA related issues   Fri 21 Jul 2017 - 20:28

please remember that I have been integrating and debugging this game for 7 years now
Back to top Go down
http://tecnobacon.com
rusty_shackleford
Experienced
avatar

Posts : 64
Join date : 2017-07-17
Location : California

PostSubject: Re: LUA related issues   Fri 21 Jul 2017 - 21:44

[You must be registered and logged in to see this link.] wrote:
these and other scripts were written that way as they are accessed from dialogs which makes it faster by doing them that way

Can you really not provide arguments when they are called via dialogue? I was looking through the dialogue files and that is what it seems.
Back to top Go down
rusty_shackleford
Experienced
avatar

Posts : 64
Join date : 2017-07-17
Location : California

PostSubject: Re: LUA related issues   Fri 21 Jul 2017 - 21:47

[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:
This is really just for TB3D/Aleks

Code:
function has_30_money(first_speaker, second_speaker)
 return first_speaker:money() >= 30
end


function not_has_30_money(first_speaker, second_speaker)
 return first_speaker:money() < 30
end


function give_30_money_to_stalker_for_info_about_ratcatcher(first_speaker, second_speaker)
 first_speaker:transfer_money(30, second_speaker)
end

Just why? After looking through a lot of these scripts it seems to me like there needs to be a lot more standardization before the mod can be truly called 'stable' for developers.

EDIT: Is this just AMK? After looking after the dialogue files it looks like you can't actually specify any arguments, and that looks like why it was like this.


lol, do you want to fix some mission scripts? we have a few of them you could fix!!!

Yes, actually. I learned my Lua from Garry's Mod, but after looking through quite a bit of this game it seems like there are some weird additions to the language that certainly don't seem needed. Like this:

Code:
class "actor_proxy"
class "aem_mob_binder" (object_binder)
class "se_lamp" (cse_alife_object_hanging_lamp)

Classes in lua? How odd! Especially when you have metatables. It seems that xrLua.dll also has all the luajit debugging stuff so that's nice.


Last edited by rusty_shackleford on Sun 23 Jul 2017 - 7:23; edited 1 time in total
Back to top Go down
TecnoBacon
Administrator
avatar

Posts : 47
Join date : 2017-06-01
Location : USA

PostSubject: Re: LUA related issues   Sat 22 Jul 2017 - 22:11

absolutely as that is how to bind interrupts to objects with the engine
I have 14 years of LUA programming as well as experience in all languages as I started programming 40+ years ago...
Back to top Go down
http://tecnobacon.com
TecnoBacon
Administrator
avatar

Posts : 47
Join date : 2017-06-01
Location : USA

PostSubject: Re: LUA related issues   Sat 22 Jul 2017 - 22:14

There will be some huge changes to the scripts when I release the new xray engine as many of these calls can be optimized along with 64 bit 12 cores new physics and direct x engines, etc...
Back to top Go down
http://tecnobacon.com
_Nite_
Veteran


Posts : 397
Join date : 2017-07-13
Location : USA

PostSubject: Re: LUA related issues   Sun 23 Jul 2017 - 0:26

64 bit support will be so nice, the mod is great but keep having memory related crashes because of the 32 bit limit
Back to top Go down
rusty_shackleford
Experienced
avatar

Posts : 64
Join date : 2017-07-17
Location : California

PostSubject: Re: LUA related issues   Sun 23 Jul 2017 - 3:15

I'm not quite as experienced as yourself, but I like to think that I know my way around Lua and a bit of C++. Most of my knowledge is from game hacking on Source and messing about in Garry's Mod for the past 8 years. I would most definitely be interested in learning more about Lua in Xray if you have any resources on that.

Thanks for changing the thread title, it is much better now. Not quite as snarky.


Last edited by rusty_shackleford on Sun 23 Jul 2017 - 7:26; edited 1 time in total
Back to top Go down
Steve90k
Moderator
avatar

Posts : 156
Join date : 2017-06-02

PostSubject: Re: LUA related issues   Sun 23 Jul 2017 - 4:19

Oh, there half a billion tons of resources!!!

some of them are esy to find, some of them less so.

Many of the originally modding knowledge was shared on the old GSC forums.
The problem with the GSC forums (and many other Stalker forums) is that there is so much content, you dont know where to start!!!

I think the GSC forums go into 392049 posts... and thats for Call of Chernobal alone!!!

It would take years to go through all those posts and extract the useful modding information.

I'm worried actually, becuase if GSC decide to shut down their forum, We would lose some really important content. I just dont have the time to do it myself.

Come to thunk of it. if anyone knows how to "site-rip" the GSC forums, please tell me (or help me to do it) I tried with a few site ripping programs once, but it ws so messed up, the end result was useless.

on another noe, the first port of call for modding is the wiki. It was based on the GSC forum information, but a great deal of the original information is missing...

GSC Forums..

[You must be registered and logged in to see this link.]


Stalker Wiki

[You must be registered and logged in to see this link.]



Game banana collection of tutorials.

[You must be registered and logged in to see this link.]

Moddb collection of tutorials...

[You must be registered and logged in to see this link.]

GOG Games forums.

[You must be registered and logged in to see this link.]

We all know that some of the stalker related forums on steam were shut down, but there are still some available.

you can find them here...

[You must be registered and logged in to see this link.]

[You must be registered and logged in to see this link.]

[You must be registered and logged in to see this link.]

There are some amazing tutorials on youtube. but there are so many of them its hard to provide links for them... you can start here though..

[You must be registered and logged in to see this link.]

Moddb SDK tutorials.

[You must be registered and logged in to see this link.]

And finally the LUA stuff..

LUA Crash course...

[You must be registered and logged in to see this link.]

LUA Long full course...

[You must be registered and logged in to see this link.]

And programming in LUA

[You must be registered and logged in to see this link.]

One other thing to take note of is Alundios tutorials for COC, which is based on Call of Pripyat.
Shadow of chernobal and call of pripyat are built in slightly different ways, but having this knowledge is quite useful..

Some of Alundios tutorials are quite good, particularly for quest creation, modifications and fixes.

[You must be registered and logged in to see this link.]

This is just the start of the information out there!
Back to top Go down
rusty_shackleford
Experienced
avatar

Posts : 64
Join date : 2017-07-17
Location : California

PostSubject: Re: LUA related issues   Sun 23 Jul 2017 - 7:16

[You must be registered and logged in to see this link.] wrote:
Come to thunk of it. if anyone knows how to "site-rip" the GSC forums, please tell me (or help me to do it) I tried with a few site ripping programs once, but it ws so messed up, the end result was useless.

You can use burp to crawl the pages, then use archive.is (which I think has an api, not sure) to archive pages. I think burp might also have a way to progressively save files that it crawls.

[You must be registered and logged in to see this link.] wrote:
And finally the LUA stuff..

I already know Lua.

Perhaps I should be more exact. I want specifically scripting related information, for example why does the x-ray engine add stuff like classes to Lua and what the purpose of that is?
Back to top Go down
Steve90k
Moderator
avatar

Posts : 156
Join date : 2017-06-02

PostSubject: Re: LUA related issues   Sun 23 Jul 2017 - 11:12

[You must be registered and logged in to see this link.] wrote:




I already know Lua.

Perhaps I should be more exact. I want specifically scripting related information, for example why does the x-ray engine add stuff like classes to Lua and what the purpose of that is?

Sorry I mis-read your question...
The engine code is beyond my knowledge I'm afriad, but Aleks1970 or TB will be able to help you with that.

I think the classes force the engine to bond something to the code. thats a pretty vague answer, but its the best of my knowledge. I'm sure Aleks will adivse you far more than me.
Back to top Go down
rusty_shackleford
Experienced
avatar

Posts : 64
Join date : 2017-07-17
Location : California

PostSubject: Re: LUA related issues   Sun 23 Jul 2017 - 12:00

[You must be registered and logged in to see this link.] wrote:
[You must be registered and logged in to see this link.] wrote:




I already know Lua.

Perhaps I should be more exact. I want specifically scripting related information, for example why does the x-ray engine add stuff like classes to Lua and what the purpose of that is?

Sorry I mis-read your question...
The engine code is beyond my knowledge I'm afriad, but Aleks1970 or TB will be able to help you with that.

I think the classes force the engine to bond something to the code. thats a pretty vague answer, but its the best of my knowledge. I'm sure Aleks will adivse you far more than me.

He was talking about the debugging capability that LuaJIT adds. You can use the same debugging capability in Garry's Mod to detect some C++ cheats with just Lua.
Back to top Go down
_Nite_
Veteran


Posts : 397
Join date : 2017-07-13
Location : USA

PostSubject: Re: LUA related issues   Sun 23 Jul 2017 - 13:03

here is one I just got tonight in my log file, it a critical one too cause it corrupted both my quicksave and autosave, I had to load my latest zep document save to continue.

FATAL ERROR

[error]Expression    : fatal error
[error]Function      : CScriptEngine::lua_error
[error]File          : E:\stalker\sources\trunk\xr_3da\xrGame\script_engine.cpp
[error]Line          : 73
[error]Description   : <no expression>
[error]Arguments     : LUA error: e:\stalkersoup\gamedata\scripts\bind_stalker.script:1397: attempt to call field 'stop' (a nil value)


stack trace:
Back to top Go down
rusty_shackleford
Experienced
avatar

Posts : 64
Join date : 2017-07-17
Location : California

PostSubject: Re: LUA related issues   Sun 23 Jul 2017 - 23:23

[You must be registered and logged in to see this link.] wrote:
here is one I just got tonight in my log file, it a critical one too cause it corrupted both my quicksave and autosave, I had to load my latest zep document save to continue.

FATAL ERROR

[error]Expression    : fatal error
[error]Function      : CScriptEngine::lua_error
[error]File          : E:\stalker\sources\trunk\xr_3da\xrGame\script_engine.cpp
[error]Line          : 73
[error]Description   : <no expression>
[error]Arguments     : LUA error: e:\stalkersoup\gamedata\scripts\bind_stalker.script:1397: attempt to call field 'stop' (a nil value)


stack trace:

Here's the code:
Code:
if reader:r_eof() then --should be input time next
 get_console():execute("load ~~~ BSTALK load: SAVE FILE IS CORRUPT !!!!!!!!!!!!!!!!!!!!!!!!!!!")
 get_console():execute("flush")
 get_console():execute("flush")
 get_console():execute("disconnect")
 get_console():execute("quit")
 self.stop()

It's a function call so it needs to be a semi-colon not a period. Periods are for referencing elements of a table. If self was a table and it contained a function called stop, you'd be able to call it in that manner.
Back to top Go down
TecnoBacon
Administrator
avatar

Posts : 47
Join date : 2017-06-01
Location : USA

PostSubject: Re: LUA related issues   Sun 23 Jul 2017 - 23:54

I do that to specifically crash the engine and not to invoke the stop function
Back to top Go down
http://tecnobacon.com
rusty_shackleford
Experienced
avatar

Posts : 64
Join date : 2017-07-17
Location : California

PostSubject: Re: LUA related issues   Mon 24 Jul 2017 - 0:07

[You must be registered and logged in to see this link.] wrote:
I do that to specifically crash the engine and not to invoke the stop function

I see. Do you have any resources on functions that the api makes available to the lua engine? Googling reveals nothing.
Back to top Go down
_Nite_
Veteran


Posts : 397
Join date : 2017-07-13
Location : USA

PostSubject: Re: LUA related issues   Wed 26 Jul 2017 - 8:17

sigh... I just got the same error that I posted above ^^ and my quicksave and autosave are getting corrupted again....

it happens at random points of the game no matter where your progress is.

it a good thing TB has it set to autosave on starting and completeing missions.
Back to top Go down
TecnoBacon
Administrator
avatar

Posts : 47
Join date : 2017-06-01
Location : USA

PostSubject: Re: LUA related issues   Wed 26 Jul 2017 - 22:48

[You must be registered and logged in to see this link.]
Back to top Go down
http://tecnobacon.com
_Nite_
Veteran


Posts : 397
Join date : 2017-07-13
Location : USA

PostSubject: Re: LUA related issues   Tue 1 Aug 2017 - 5:57

[error]Expression : fatal error
[error]Function : CScriptEngine::lua_error
[error]File : E:\stalker\sources\trunk\xr_3da\xrGame\script_engine.cpp
[error]Line : 73
[error]Description : <no expression>
[error]Arguments : LUA error: e:\stalkersoup\gamedata\scripts\db.script:640: attempt to index field '?' (a nil value)

Here is a new one I just got
Back to top Go down
_Nite_
Veteran


Posts : 397
Join date : 2017-07-13
Location : USA

PostSubject: Re: LUA related issues   Wed 9 Aug 2017 - 7:37

[error]Expression : fatal error
[error]Function : CScriptEngine::lua_error
[error]File : E:\stalker\sources\trunk\xr_3da\xrGame\script_engine.cpp
[error]Line : 73
[error]Description : <no expression>
[error]Arguments : LUA error: e:\stalkersoup\gamedata\scripts\new_dialog.script:485: attempt to call method 'section' (a nil value)

another new one
Back to top Go down
Sponsored content




PostSubject: Re: LUA related issues   

Back to top Go down
 
LUA related issues
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Windows 10 MSTS Related issues
» LUA related issues
» Valkyrie Construction Issues
» I knew there were issues with Finecast...
» iOS6 Update Issues

Permissions in this forum:You cannot reply to topics in this forum
STALKERSOUP :: STALKERSOUP Main discussions-
Jump to: