[0.16.36] WIP Mod - Train Engineer - help needed

Place to get help with not working mods / modding interface.
Post Reply
Svensson
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sun Apr 22, 2018 2:29 pm
Contact:

[0.16.36] WIP Mod - Train Engineer - help needed

Post by Svensson »

Hi,

I'm Sven, playing Factorio since 0.14 and new into modding Factorio. Until 3 weeks ago I had no clue of modding in Lua or Factorio. In the past i used many of the awesome mods here e.g. LTN, yuoki, Warehousing, ...
In Factorio i like especially the trains and I have a beauty & symmetry OCD. I started modding by dissecting community mods like yuoki's railways mod and others.
Factorio is great game with a great community - and i'd like to give something back. ;) So here i am with my work in progress mod called 'train engineer'. So far it's working on my test maps. But iam not confident enough in my modding skills and my understanding of Lua to let it loose on the public yet. :cry: I have a few questions and i need the help of the community and maybe the devs here - see the paragraph 'questions @ forum' further down. The mod in it's current state is attached as a zip. Any help or tips to make this mod better, more stable, more ups friendly or hints/links/etc to improve my modding skills are very appreciated. THANKS!!!
Description:
-------------------------
You love trains in Factorio? , You don't like loops?, You don't like the look/feel of dual-header trains? You have a beauty & symmetry OCD?
Then maybe Train Engineer is a mod for YOU!
With this mod you get a skilled and fully certified Train Engineer (see https://en.wikipedia.org/wiki/Railroad_engineer). After years of ative duty
Train Engineer Bob has become so skilled his actions seem like magic. He can shunt/switch trains at terminal stations without another track or locomotive.
And he works currently for free.

example for progress of events:
-------------------------------

terminal station
1) =LL-CCCCCCC============== >> train arrives at station (inbound movement)

2) =LL-CCCCCCC============== >> train waits until leave conditions are met

3) Train Engineer Bob does his magic

terminal station
4) =CCCCCCC-LL============== >> train leaves station (outbound movement)

During event 3) to 4):
- mod reads train and copies certain parameters (train composition, carriage types, cargo inventory, fuel of locomotives, loco colors, schedule)
- old train gets removed
- new train gets placed in reversed direction + parameters and inventory is inserted (a completely new train with a new Train id is created!)


Supports:
-------------------------
- different train composition LL-CCC >> CCC-LL, as long as all locos face the same direction
- fuel + cargo inventory
- schedules
- locomotive colors
- supports base game locomotive, cargo-wagon, artillery-wagon, fluid-wagon
- should support all modded loco + wagons which were derived from the base game entity types and are only modded in the entity prototype >> @me: more testing ...!

>> After every direction change train engineer performs a fuel check on every loco in the handled train. A message is given on the console @ 'fuel inventory < 10 items' and @ 'fuel inventory = 0',
the energy remaining in the burner (fuel bar) is not taken into account


Limitations:
-------------------------
>> only trains with locos facing in one direction will fire Train engineer event
>> switching trains only at stations with straight rails > no curves or diagonal rails within the length of the train allowed!
>> no cargo-wagon filters or slot filters currently supported
>> trains can not be ridden by passengers
>> trains have to be in automatic mode (mod event hooked on on_train_changed_state with with change from
'train waiting at station until leave conditions are met' to 'path lost' >> which means: single direction train at a terminal station)
>> not multiplayer tested or tested on servers!!!
>> only standard lenght wagons supported (lenght == 6), short wagons like yuoki's 'zement wagons' will fail on Train creation (displacement + not connected)
>> only fluid-wagons with 1 fluidboxes are supported


>> To Do's:
-------------------------
-- check for incompabilities with yuoki, diesel-loco, ...
-- code optimisation + cleanup
-- Train::id (uint) overflow?! what happens
-- ask in forum for help and optimization
-- big test map >> performance issues?
-- copy_settings(entity) → dictionary string → uint
-- cargo-wagon filters + blocked slots
-- maybe a seperate setting in mods gui for the remaining fuel limit message instead of the fixed 10 items
-- maybe change the fuel check to calculate the remaining MJ in a loco instead of the remaining quantity of the fuel items
-- test if LTN works
-- find out which mod adds the console message 'Warning, a train has no path to station xx' -> it's TheFatController > see ingame setup for 'train has no path'
-- mod setting to mute fuel check messages - otherwise it's spamming the console
-- test all liquids >> water + steam works so far ...
-- basic test with yuoki railway (carriages and locos) seems promising, as long as carriage lenght == 6

>> questions @ forum:
----------------------
- what happens at a Train::id overflow? is there a way to preserve the old train id?
- is there a way to safely force passengers off a train which is to be turned around and put them back into the new train?
- is there a clean way to copy settings like inventory filters or blocked slots from a source carriage to a new carriage while the source entity allready got removed via *.destroy() e.g. via a 'invisible dummy train entity'?
As I understand copy_settings() only works with two existing entities.
- in debug mode "F4" >> show-time-usage >> x/y/z >>> what stand z for? Even on a small map z goes up 'linear' to the lenght of just one test train (lenght=15) with z beyond 20++
x/y/z >> is it avg./min./max time? Z this high doesn't seems right! Can anyone point me to informations/guides on how to optimize my code / reduce the time usage?
- volunteer guinea pig to test the mod are very welcome

>> test environment:
-----------------------------
- factorio 0.16.36 win64 steam version on core i7
>>IMPORTANT:
-----------------------------
- Backup your Saves and mods folder before use!
- use on your own risk!
Attachments
train-engineer_0.0.1.zip
(5.67 KiB) Downloaded 92 times

Svensson
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sun Apr 22, 2018 2:29 pm
Contact:

Re: [0.16.36] WIP Mod - Train Engineer - status update

Post by Svensson »

Hi again,

still working on my mod, sadly no answers whatsoever. Some questions I solved myself, with some I could still need help. And many new features...
Here's a gif of Bob working ...
TE_working.gif
TE_working.gif (408.2 KiB) Viewed 4579 times

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Version: 0.0.1 - Build: 180501 - Factorio 0.16.36

Description:
-------------------------
You love trains in Factorio? , You don't like loops?, You don't like the look/feel of dual-header trains? You have a beauty & symmetry OCD?
Or you sometimes just need to turn around your personal train?

Then maybe Train Engineer is a mod for YOU!

With this mod you get a skilled and fully certified Train Engineer named Bob (see https://en.wikipedia.org/wiki/Railroad_engineer). After years of ative duty
Train Engineer Bob has become so skilled his actions seem like magic. He can shunt/switch trains at terminal stations without another track or locomotive.
And he works currently for free.

example for progress of events:
-------------------------------

terminal station
1) =LL-CCCCCCC============== >> train arrives at station (inbound movement)

2) =LL-CCCCCCC============== >> train waits until leave conditions are met

3) Train Engineer Bob does his magic

terminal station
4) =CCCCCCC-LL============== >> train leaves station (outbound movement)

During event 3) to 4):
- mod reads complete train and copies certain parameters (train composition, carriage types, cargo inventory, fuel of locomotives, loco colors, schedule, train_mode)
- old train gets removed
- new train gets placed in reversed direction + parameters and inventory is inserted (a completely new train with a new Train id is created!)

switching modes:
--------
[Trains in manual mode] >> via hotkey
[Trains in automatic mode] >> via hotkey or mod event trigger:

mod event trigger: hooked on 'on_train_changed_state with' with change from 'train waiting at station until leave conditions are met' to 'path lost'
>> which means: single direction train at a terminal station

Supports:
-------------------------
- [Trains in automatic mode] different train composition LL-CCC >> CCC-LL, as long as all locos face the same direction
- [Trains in manual mode] every train composition (single and dual direction trains)
- cargo inventory + fuel inventory including burner fuel bar
- schedules
- locomotive colors
- supports base game locomotive, cargo-wagon, artillery-wagon, fluid-wagon
- custom hotkey for switching of manual ridden trains
- trains in automatic mode and manual_mode via hotkey - train_mode 'automatic/manual' is preserved during switching
- should support all modded loco + wagons which were derived from the base game entity prototypes and are only modded in the entity prototype >> @me: more testing ...!
- mod settings for locomotive fuel check low-level warning
- supports equipment grid transfer if vehicle has equipment grid [mod VehicleGrid_0.2.0] >> @me: more testing ...!

>> After every direction change train engineer performs a fuel check on every loco in the handled train.
A message is given on the console @ 'fuel inventory < [mod settings value]' and @ 'fuel inventory = 0',
the energy remaining in the burner (fuel bar) is not taken into account

Limitations:
-------------------------
>> [Trains in automatic mode] only trains with locos facing in one direction will fire Train engineer event
>> switching trains only at stations with straight rails > no curves or diagonal rails within the length of the train allowed!
>> no cargo-wagon filters currently supported
>> equipment grids currently supported, but battery charge is 0 after switch and equipment order is changed
>> only one driver/passenger stays automatically on the train - remaining passenger have to manual reenter or walk home ;-)
>> not multiplayer tested or tested on servers!!! - disconnects probable
>> only standard lenght wagons supported (lenght == 6), short wagons like yuoki's 'zement wagons' will fail on Train creation (displacement + not connected)
>> only fluid-wagons with 1 fluidboxes are supported
>> locomotives & carriages with special behavior e.g. electric power locomotives (functions via control.lua) will often lead to crashs or non function after switching

>> To Do's:
-------------------------
-- code optimisation + cleanup
-- Train::id (uint) overflow - what happens?
-- copy_settings(entity) → dictionary string → uint
-- cargo-wagon filters?
-- maybe change the fuel check to calculate the remaining MJ in a loco instead of the remaining quantity of the fuel items
-- raise_event for carriage.destroy() > inform other mods about removed entity if possible
-- test compatibility of equipment_grid transfer
-- seperate func for get_equipment_grid_contents
-- MORE TESTING

>> questions @ forum:
----------------------
- what happens at a Train::id overflow? is there a way to preserve the old train id?
- is there a clean way to copy settings like inventory filters from a source carriage to a new carriage while the source entity allready got removed via *.destroy() e.g. via a 'invisible dummy train entity'?
As I understand copy_settings() only works with two existing entities.
- in debug mode "F4" >> show-time-usage >> x/y/z >>> what stand z for? Even on a small map z goes up 'linear' to the lenght of just one test train (lenght=15) with z beyond 20++
x/y/z >> is it avg./min./max time? Z this high doesn't seems right! Can anyone point me to informations/guides on how to optimize my code / reduce the time usage?
- volunteer guinea pig to test the mod are very welcome

>> test environment:
-----------------------------
- factorio 0.16.36 win64 steam version on core i7


>> compatibilities & tested mods:
-----------------------------
- FARL + FARL module
- yuokis locos + wagons (as long as carriage length = 6 tiles)
- LTN
- Angel's Addons - Petrochem Train (tested with water + steam)
- Nuclear Locomotives 1.1.4 by GotLag
- 'shuttle train', because its an equipment grid item

>> known problems/incompatibilities/bugs:
------------------------------------------
- 'Diesel Locomotive' by evildogbot100 (due to 'non chemical' liquid fuel) >> crash
- 'TheFatController' >> see known problems/incompatibilities/bugs
- 'vehicle wagon' when loaded with a vehicle (loading a vehicle onto it and switching the train works, the following unloading leads to crash)
- 'Fusion Train' by magu5026 >> crash
- 'Electric Train' by magu5026 >> no crash, but switched new E-Locomotive has no fuel/power - only manual building seems to connenct the train entitiy to the power provider
- 'Senpais Trains' by LuziferSenpai >> crash when switching the battle electronic train mk1-3

- TheFatController >> every from TE new created new train adds an entry in a table, which doesn't gets removed when the entity is destroyed by TE.
See the increasing table numbers in Fat Gui. Page number increase but only the real currently running trains are listed on the last page!
F4 debug: show-time-usage x/y/z >> z of TheFatController constantly goes up with every new train, making the game lagging. Probably the hole table is in
some way calculated even the old TE trains got destroyed!
>> t = game.surfaces[1].get_trains() >> #t is constant! No dead entries from TE trains ?!?!

>> performance:
-------------------
- x/y/z dependent on TE event spread and number of switched trains. Many trains switched at the same time and z goes up
>> see 'Train_Engineer_Performance_Test_1.xlsx' for needed calculation time with different trains

>> history:
-----------------------------
Build: 1804xx
- initial build and post in forum

Build: 180423
- small changes in func build_train
- testing bug in TheFatController

Build: 180424
- add + test automatic dismount of train passengers
- rewrite of func train_build >> pos xy now precalc before call of train_build

Build: 180426:
- automatic dismount & mount of train passengers (all passengers automatically get dismounted before switching,
first found driver/passenger in the train becomes the new driver - remaining passenger have to walk home ;-)
- a bit code optimization

Build: 180427:
- added custom hotkey for switching of ridden trains
- added mod settings for fuel-low-level item count + message level

Build: 180428:
- testing for incompatibilities on different mods
- added support for cargo-wagon blocked slots

Build: 180501:
- added equipment grid support

>>IMPORTANT:
-----------------------------
- Backup your game data, saves and mod folder before use!
- use on your own risk!
- Beware of the noob programmer >> me :lol:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Attachments
Train_Engineer_Performance_Test_1.xlsx
(85.69 KiB) Downloaded 81 times
train-engineer_0.0.1 - 180501.zip
(9.32 KiB) Downloaded 90 times

Bilka
Factorio Staff
Factorio Staff
Posts: 3129
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [0.16.36] WIP Mod - Train Engineer - help needed

Post by Bilka »

Mobile cuts off your quote because chrome sucks, but i can answer 1 question for you. Train-id wont overflow in any normal game, game.tick will before the train id does, since it's also uint32_t. So you dont need to concern yourself with that unless you create hundreds of new trains per tick, every tick. Or let the game run non-stop at 60UPS for 2.5? or 3.5? years and create 1 train per tick, which is still rather unrealistic in any kind of normal gameplay.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2633
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: [0.16.36] WIP Mod - Train Engineer - help needed

Post by steinio »

UUh nice, TTD alike train turn around at final station.

Do you need to recreate the whole train or do you just move the locos?
Image

Transport Belt Repair Man

View unread Posts

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [0.16.36] WIP Mod - Train Engineer - help needed

Post by eradicator »

steinio wrote:UUh nice, TTD alike train turn around at final station.
Do you need to recreate the whole train or do you just move the locos?
Moving the loco would change the wagon order relative to the loco. So not really an option. "Tower of Hanoi" style teleporting wagon swapping might work. I hightly disrecommend deleting and recreating the train. Correctly replicating a LuaInventory that contains arbitrary items is highly complex and bound to cause all kinds of bugs. Ammo capacity, Item-with-inventory, Power Armor Grids, Blueprints etcpp, just to name a few problem sources. It's also probably slower than teleporting.

I'm glad to help any modder...but you'll have to make your questions shorter and more concise. Not everyone has the time to read a several pages long essay to try to extract the few relevant problematic points ;).

Svensson
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sun Apr 22, 2018 2:29 pm
Contact:

Re: [0.16.36] WIP Mod - Train Engineer - help needed

Post by Svensson »

Bilka wrote:Mobile cuts off your quote because chrome sucks, but i can answer 1 question for you. Train-id wont overflow in any normal game, game.tick will before the train id does, since it's also uint32_t. So you dont need to concern yourself with that unless you create hundreds of new trains per tick, every tick. Or let the game run non-stop at 60UPS for 2.5? or 3.5? years and create 1 train per tick, which is still rather unrealistic in any kind of normal gameplay.
Thanks for your input. I tested a bit more and tormented my excel >> the moment of train-id overflow is also depended on the train lenght.
There are two 'for' loops in my code. In the first loop every carriage of the train gets destroyed one by one. In the second loop the new train is created carriage by carriage. And very time a carriage is added to a train or removed from a train factorio creates a new unique entity + train-id. Similar to coupling/decoupling manually. The numbers are still pretty unrealistic, but depending on how people will use the mod >> just never say never. I will write a little note that people have to launch their rocket before the uint overflow. :D
Calculation for train-id overflow for 1 carriage
Calculation for train-id overflow for 1 carriage
1.JPG (33.37 KiB) Viewed 4533 times
Calculation for train-id overflow for 10 carriages
Calculation for train-id overflow for 10 carriages
2.JPG (33.87 KiB) Viewed 4533 times

Svensson
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sun Apr 22, 2018 2:29 pm
Contact:

Re: [0.16.36] WIP Mod - Train Engineer - help needed

Post by Svensson »

steinio wrote:UUh nice, TTD alike train turn around at final station.

Do you need to recreate the whole train or do you just move the locos?
It is a 'full' rebuild. The hole train gets scanned, then destroyed one by one and finally rebuild one by one in reversed order.

'full' means: carriage by carriage according to the former train composition. There are some limitations on special cargo items and entity parameters, e.g. slot filters for cargo-wagons. Maybe a few of these limitations I will never be able to solve. But I can try and learn along the way.

Svensson
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sun Apr 22, 2018 2:29 pm
Contact:

Re: [0.16.36] WIP Mod - Train Engineer - help needed

Post by Svensson »

eradicator wrote:
steinio wrote:UUh nice, TTD alike train turn around at final station.
Do you need to recreate the whole train or do you just move the locos?
Moving the loco would change the wagon order relative to the loco. So not really an option. "Tower of Hanoi" style teleporting wagon swapping might work. I hightly disrecommend deleting and recreating the train. Correctly replicating a LuaInventory that contains arbitrary items is highly complex and bound to cause all kinds of bugs. Ammo capacity, Item-with-inventory, Power Armor Grids, Blueprints etcpp, just to name a few problem sources. It's also probably slower than teleporting.

I'm glad to help any modder...but you'll have to make your questions shorter and more concise. Not everyone has the time to read a several pages long essay to try to extract the few relevant problematic points ;).
thanks for your feedback. Yeah, you are right, any cargo-item with an equipment grid/ an own inventory/ a filled blueprint/ or items with special properties like a locomotive with colors set won't work [curently/maybe forever :cry: ].

I thought train teleport isn't supported any more since 0.15.7- see: viewtopic.php?f=11&t=45264&hilit=15.2+minor+teleport, so I choose destroy and rebuild as my way ... :?:

Regarding the essay, I keep that in mind ...

Svensson
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sun Apr 22, 2018 2:29 pm
Contact:

Re: [0.16.36] WIP Mod - Train Engineer - help needed

Post by Svensson »

So here are my open questions:
  • 1) What happens at a Train::id overflow? If it is happening at all. Is there a way to preserve the old train id and give it to a new created train?

    2) Is there a clean way to copy settings like inventory filters and blocked slots from a source carriage to a new carriage while the source entity allready got removed via *.destroy() e.g. via a 'invisible dummy train entity'? As I understand [copy_settings(entity) → dictionary string → uint] only works with two existing entities.

    3) In debug mode "F4" >> show-time-usage >> x/y/z >>> what stand z for? Is it avg./min./max time as I read on a reddit post?
thanks - and a good night ...


User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [0.16.36] WIP Mod - Train Engineer - help needed

Post by eradicator »

Bah. I didn't know trains can't be teleported. I just assumed they're entities and it would really make the code significantly less bug prone. The post says "trains" can't be teleported (as a whole) though. So maybe there's a chance left for individual carriages to.../sigh.

1) Funny unpredictable things happen on overflows. I remember a bug report where chat color changed randomly after game.tick overflow. As IDs are managed internally you can not manipulate them via API.

2) Nope. Destroyed entities can not be interacted with. So you'd need to store some carriages somewhere to use for swapping. Those don't need to be recreated every time. Just put them somewhere near the map border i guess. Though depending on how you do it a single one might suffice.
A-B-C-D-E train, X buffer.
1) X = E
2) A-B-C-D-A, A = A
3) E-B-C-D-A, E = X
4) X = D
5) E-B-C-B-A, B = B
6) E-D-C-B-A, D = X

2A) Using a "buffer" carriage has an additional large benefit. You can just copy the concent of the inventory too, and thus all item types work without any additional code.

3) Dunno :D.

mrvn
Smart Inserter
Smart Inserter
Posts: 5704
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [0.16.36] WIP Mod - Train Engineer - help needed

Post by mrvn »

Svensson wrote:I thought train teleport isn't supported any more since 0.15.7- see: viewtopic.php?f=11&t=45264&hilit=15.2+minor+teleport, so I choose destroy and rebuild as my way ... :?:
Damn. And here I was planning to build a train lift that moves a train from one surface to another. Think underground mines and a lift to raise the ore train.

Svensson
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sun Apr 22, 2018 2:29 pm
Contact:

Re: [0.16.36] WIP Mod - Train Engineer - help needed

Post by Svensson »

eradicator wrote:Bah. I didn't know trains can't be teleported. I just assumed they're entities and it would really make the code significantly less bug prone. The post says "trains" can't be teleported (as a whole) though. So maybe there's a chance left for individual carriages to.../sigh.
I played a bit around with teleport(position, surface) → boolean and I can't even teleport a single cargo-wagon. No matter what I tried. The function allways returned false.
eradicator wrote: 2A) Using a "buffer" carriage has an additional large benefit. You can just copy the concent of the inventory too, and thus all item types work without any additional code.
Can you tell me how to accomplish this? I looked trough the API doc but I am clueless. I can use entity.get_inventory(inventory) on the source carriage. But this should just be a reference not a full copy of the LuaInventory. And I could not find a API function to 'set'/insert a full inventory. I tried the following code. With this way I only create 'new' items and do not transfer the original ones. So every equipment, blueprint, power in batteries, etc is lost.

Code: Select all

local cargo_inventory = {}	
cargo_inventory = trains[1].carriages[2].get_inventory(defines.inventory.cargo_wagon)
cargo_inventory = cargo_inventory.get_contents() 

for item, quantity in pairs(cargo_inventory) do
    trains[2].carriages[2].insert({name=item, count=quantity})	
end

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [0.16.36] WIP Mod - Train Engineer - help needed

Post by eradicator »

Should look something like this (untested code):

Code: Select all

local inv1 = ???.get_inventory(defines.inventory.cargo_wagon)
local inv2 = ???.get_inventory(defines.inventory.cargo_wagon)

for i,#inv1 do
 inv2[i].set_stack(inv1[i])
 end
I.e. enumerate all slots, and transfer the LuaItemStack as is. There's also .transfer_stack which might be preferrable to set_stack if the source is going to be deleted anyway. Also you may need to check .valid_for_read on the source stack as i don't know how it will behave with empty stacks.

Svensson
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sun Apr 22, 2018 2:29 pm
Contact:

Re: [0.16.36] WIP Mod - Train Engineer - help needed

Post by Svensson »

eradicator wrote:Should look something like this (untested code):

Code: Select all

local inv1 = ???.get_inventory(defines.inventory.cargo_wagon)
local inv2 = ???.get_inventory(defines.inventory.cargo_wagon)

for i,#inv1 do
 inv2[i].set_stack(inv1[i])
 end
I.e. enumerate all slots, and transfer the LuaItemStack as is. There's also .transfer_stack which might be preferrable to set_stack if the source is going to be deleted anyway. Also you may need to check .valid_for_read on the source stack as i don't know how it will behave with empty stacks.
Good pointer! I'll play around a bit with that and see what i can achieve. Thanks.

Post Reply

Return to “Modding help”