ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Clear Sky Forum » Mod discussion
PreSky v0.2

« Previous 10 events | 1 ... 201 202 203 204 205 206 207 208 209 210 | Next 10 events »
Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  07:51:13  10 December 2013
profilee-mailreply Message URLTo the Top
SetaKat
Ex modder, Zones only ferret and will someday release a game
(Resident)

 

 
On forum: 02/20/2010
Messages: 6340
Nice to see some activity here without me having to stir something up.
To address some of the questions...

---QUOTATION---
What I'm hoping for is a choice between the story or just freeplay, and in Freeplay's case something to do other then just wander around (Unless the ai has been changed in a way that makes it hard to predict so I'm open to surprises, part of the reason I don't play CoP as much is because you know that people won't move around at night since they'd have all made camp or something like that). Anyway those are my thoughts on the matter, no rush Fluffy/Seta but I'm looking forward to your mod and the next installment of TFW... And hopefully Spartan will return after a drunken frenzy or wherever he's been off to : P
---END QUOTATION---


* hides his dev notes*
Oi! Stop peaking!

In all seriousness though, I'm currently looking at trying to enable freeplay from the get go, but also giving you the chance to pick up the story from the start, and go through with that. It won't be pure freeplay, as some storyline characters will remain locked in their rooms/bunkers until you get far enough in the story, but basically, you'll be able to switch between the 2 as you wish.
I've got a lot of stuff I'd like to include in this version, but as most of it is geared more towards the later freeplay builds, I'll have to delay it. Some of my alife fixes and tweaks will be included however.
The reason I'm going for a mix of story and freeplay is that I need to rewrite the tasks script, and make a new bunch of missions. That'll take a while, so until then I'll work on this bit by bit.
  12:52:38  10 December 2013
profilee-mailreply Message URLTo the Top
SetaKat
Ex modder, Zones only ferret and will someday release a game
(Resident)

 

 
On forum: 02/20/2010
Messages: 6340
...And after this evenings modding session, I have been reminded of why I almost gave up modding stalker completely. f***** sh**** lua!
Create and fill several tables. Access those tables from another script, and they are EMPTY. The game magically empties them on its own, cause I sure as hell don't.
Screw it, I'm going to bed
  14:07:50  10 December 2013
profilee-mailreply Message URLTo the Top
Xetrill
(Senior)
 
On forum: 07/08/2008
Messages: 129

---QUOTATION---
...And after this evenings modding session, I have been reminded of why I almost gave up modding stalker completely. f***** sh**** lua!
Create and fill several tables. Access those tables from another script, and they are EMPTY. The game magically empties them on its own, cause I sure as hell don't.
Screw it, I'm going to bed
---END QUOTATION---


Technically that's either the game/engine or luabind, not sure. Lua itself doesn't provide an implicit way to call other scripts/files. That's what require() is for.

But Lua holds onto everything forever unless explicitly told not too (via __mode) or it can discern that object is white (has no one referencing it).
(__mode, weak tables: http://www.lua.org/manual/5.1/manual.html#2.10.2)
  03:03:14  11 December 2013
profilee-mailreply Message URLTo the Top
Alundaio
Sad Clown
(Resident)

 

 
On forum: 04/05/2010
 

Message edited by:
Alundaio
12/11/2013 4:30:18
Messages: 2230
That shouldn't happen, what's in the tables? Are they vectors or something? Maybe there is an error in the script and it didn't load. I usually check all my script in SciTE. I just copy&paste into a test.lua and compile. Very quick way to check syntax. I even sometimes pseudo-code out my functions or classes with SciTE before I port it over to the stalker class system; a good way to visualize your design before implementation.
  04:49:42  11 December 2013
profilee-mailreply Message URLTo the Top
SetaKat
Ex modder, Zones only ferret and will someday release a game
(Resident)

 

 
On forum: 02/20/2010
 

Message edited by:
SetaKat
12/11/2013 4:51:47
Messages: 6340
I've added several new tables to sim_faction, the purpose of them is to replace several tables defined globally in sim_squad_generic.script controlling what mutants spawn on what levels, and how many are in each squad.
These tables are defined in the faction_monster.ltx, and are correctly read in at game start/load by printing the keys and the values out to the logs. Both tables store an array of values, the format of them is as follows
table1[levelname] = {mutant1, mutant2, ..., mutantn} <- defines possibe mutant spawns for a level
table2[mutant] = {min, max} <- gives min/max squad numbers for a given mutant type

However, when these tables are accessed later on by the squad creation in sim_squad_generic.script, none of the data loaded in at game start is stored in them, so table1 and table2 exist, but none of the data stored in them exists, resulting in a nil value being returned whenever I try to get data from them.
I'm not at my normal computer now, so I'll post the relevant code once I am. Hopefully I've described my issue here well enough for you to offer some possible causes O great scripter.
  05:12:10  11 December 2013
profilee-mailreply Message URLTo the Top
Alundaio
Sad Clown
(Resident)

 

 
On forum: 04/05/2010
Messages: 2230
Are you creating the tables at the top of a script, in the _G.on_game_start or in actor net spawn? If it's in net_spawn, when the level object of the actor loads up it's already too late as all the squads will have been created. You'll have to do it either in _G.on_game_start or se_actor init. It's hard to guess without seeing the actual stuff, though. I had a similar problem back when I first created my random NPC loadout script.
  05:49:41  11 December 2013
profilee-mailreply Message URLTo the Top
SetaKat
Ex modder, Zones only ferret and will someday release a game
(Resident)

 

 
On forum: 02/20/2010
Messages: 6340
The tables are created from the existing read_params method, call from the STATE_READ method in the sim_faction class, and my new tables are created along with all of the other faction tables and expansion tiers, which work as intended (and some of which are used just a little bit further down)
I'll post my code in about 1 1/2 hours when I get home.
  11:18:47  11 December 2013
profilee-mailreply Message URLTo the Top
SetaKat
Ex modder, Zones only ferret and will someday release a game
(Resident)

 

 
On forum: 02/20/2010
 

Message edited by:
SetaKat
12/11/2013 13:11:01
Messages: 6340
Ok, no need to post my code. Came home, looked at it, and straight away spotted the typo causing the issue. So fixed that.
I've spent another few hours trying out various things, and while the code is still buggy, I've managed to get a lot further for the new mutant squad spawner. Once I fix this current crash, I should have squads spawning no problems.
After that, I just need to tidy up my code and remove all the debug lines.

EDIT:
Seems the new code for the mutant squads are working fine. There is a bit of redunancy, but I'll tidy that out in the next few days, then I'll consider extending it to the rest of the factions for greater control over squad spawning
  13:29:48  11 December 2013
profilee-mailreply Message URLTo the Top
Xetrill
(Senior)
 
On forum: 07/08/2008
Messages: 129
You can just use Lua to check the syntax for you via command line -- see the -l and -p switches.
Personally, I use a modified version of LuaCheck.lua, which does just that.

LuaCheck.lua: http://pastebin.com/2Lgu9QFY
RunLuaCheck.cmd: http://pastebin.com/0Z5NfNxD
original LuaCheck.lua: http://lua-users.org/lists/lua-l/2002-01/msg00191.html

A pleasant side effect of that is, it actually parses the code and creates a dump (%TEMP%\LuaCheck.log) of all defined symbols. Which makes checking for global table accesses (GETGLOBAL) and such quite easy.
  19:34:21  11 December 2013
profilee-mailreply Message URLTo the Top
SetaKat
Ex modder, Zones only ferret and will someday release a game
(Resident)

 

 
On forum: 02/20/2010
Messages: 6340
Does it do string comparisons for function parameters across different files?
Had a misspelled string passed across to a function in another script that was causing the issue. Not a syntax issue as such.
I also have Don Reba's Lua syntax checker, so if I get an invalid script during a test, I usually run it through that.
 
Each word should be at least 3 characters long.
Search:    
Search conditions:    - spaces as AND    - spaces as OR   
 
Forum Index » S.T.A.L.K.E.R.: Clear Sky Forum » Mod discussion
 

All short dates are in Month-Day-Year format.


 

Copyright © 1995-2020 GSC Game World. All rights reserved.
This site is best viewed in Internet Explorer 4.xx and up and Javascript enabled. Webmaster.
Opera Software products are not supported.
If any problem concerning the site functioning under Opera Software appears apply
to Opera Software technical support service.