i have been using my own trading mod since version 3.0 ... i was using YAT AI before and seen some codes there from euclid or yorric i think i dont remember. i made a totally different mod starting from scratch with some features on it that is better than in the vanilla. the code is also made so that having too many trading ships using the mod will not impact performance. even though its working great for me, i still cant figure out why some trades would fail. my questions are as follows ;
1. what is "virtual='true'" and what does it do ?
2. can buyoffers or selloffers be cancelled at any time by the NPC ? i set a mod to reserve the wares for trade right before moving to the target zone of trade. but since 3.0 i have encountered a lot of events that would stop that. like my ship would reserve the wares, then move to the trade zone, but before parking the offer is gone or does not exist anymore but my reservation still stands ! i had to re-search the trade offer before parking, after parking, to sort of refresh the offer and let it "exists". when the buyer/seller changes his trade qty is seems to invalidate my $tradeoffer and so $tradeoffer.exists becomes false. i guess im wondering how can i preserve that trade offer from my current zone , flying to the target trade zone, and park at the target dock without losing the trade offer.
3. execute trade fails on me when both ships and station does not have cargolifters, trade qty is 0, or if my ship is not carrying enough money. my problem with this is that the computer does not return you any vital information on why your trade failed. on "trade.performtraderun.xml" it only has some checks before trade that would verify if the execute_trade would fail, but if you pass those checks and reacht he execute_trade line and the trade fail you are given no error messages.
thank you and i hope you guys can help me out with this
