hamatank Posted January 10 Share Posted January 10 Hello. I am a newbie who wants to learn how to script something. Recently, I found a mod called "Tamriel Resource Exchange" and the concept of the mod is pretty good so I installed it and played some. But scripts seems doesn't work at all or half working I think... I tried to contact with the modder but he/she did not answer yet but I really want to see it working because The idea was too good... I cannot upload whole mod but I just want to know that the moder is doing right... below is some part of the scripting... scn TRXCornFarmControlScript int choice int NumWorkers int choosing int ProductionFlag int curMonth int DaysSincePaid int DayPaid int wages int Salary = 325 int earnings Begin OnActivate set choosing to -1 End Begin GameMode if (gameday == 28 && Player.getfactionrank TRXCornFarmFaction == 1 && curMonth != gameMonth) if (NumWorkers == 3) set earnings to rand 4800 5200 elseif (NumWorkers == 2) set earnings to rand 2800 3200 elseif (NumWorkers == 1) set earnings to rand 800 1200 else set earnings to 0 endif cornmoneychest.additem gold001 earnings set curMonth to gameMonth endif if (NumWorkers >= 1) set DaysSincePaid to gamedayspassed - daypaid endif if (NumWorkers == 0 && ProductionFlag == 0) set DaysSincePaid to gamedayspassed - daypaid set productionflag to 1 endif if (choosing == -1) if (productionflag == 0) Messagebox "Controls:", "Hire Worker", "Fire Worker", "Halt Production", "Pay Workers" set choosing to 1 elseif (productionflag == 1) Messagebox "Controls:", "Hire Worker", "Fire Worker", "Continue Production", "Pay Workers" set choosing to 1 endif elseif (choosing == 1) set choice to getbuttonpressed if (choice == 0) set choosing to 10 elseif (choice == 1) set choosing to 11 elseif (choice == 2) set choosing to 12 elseif (choice == 3) set choosing to 13 endif elseif(choosing == 10) if (NumWorkers == 3) Message "Maximum amount of workers for this facility reached." elseif (NumWorkers == 2) cornworker03.enable set NumWorkers to NumWorkers + 1 elseif (NumWorkers == 1) cornworker02.enable set NumWorkers to NumWorkers + 1 elseif (NumWorkers == 0) cornworker01.enable set NumWorkers to NumWorkers + 1 message "Worker Hired" set productionflag to 0 endif set choosing to 0;---------------------------------------------Close Menus elseif(choosing == 11) if (NumWorkers == 3) if (DaysSincePaid > 5 && player.getgold > Salary) cornworker03.disable set NumWorkers to NumWorkers - 1 player.removeitem gold001 Salary else message "You can not afford severance pay at this time." endif elseif (NumWorkers == 2) if (DaysSincePaid > 5 && player.getgold > Salary) cornworker02.disable set NumWorkers to NumWorkers - 1 player.removeitem gold001 Salary else message "You can not afford severance pay at this time." endif elseif (NumWorkers == 1) if (DaysSincePaid > 5 && player.getgold > Salary) cornworker01.disable set NumWorkers to NumWorkers - 1 player.removeitem gold001 Salary else message "You can not afford severance pay at this time." endif elseif (NumWorkers == 0) Message "There are no workers to fire in this facility" endif set choosing to 0;---------------------------------------------Close Menus elseif(choosing == 12) if (ProductionFlag == 0) set ProductionFlag to 1 elseif (ProductionFlag == 1) set ProductionFlag to 0 endif set choosing to 0;---------------------------------------------Close Menus elseif(choosing == 13) if (DaysSincePaid >= 14) set wages to Salary * NumWorkers player.removeitem gold001 wages set daypaid to gamedayspassed else Message "You do not need to pay wages yet" endif set choosing to 0;---------------------------------------------Close Menus endif if (DaysSincePaid > 17) CornWorker01.disable CornWorker02.disable CornWorker03.disable set NumWorkers to 0 set DaysSincePaid to 0 set productionflag to 1 endif End The function is simple. If I buy a corn farm, farm control (an object looks like a book) appears and I can mange the farm with the book. But the book seems not working now... Link to post
fejeena Posted January 10 Share Posted January 10 You know the Mod is not finished. Maybe the book was added but not the quest and/or scripts finished. Mod is from 2008 so it will never be finished. You have OBSE ? Link to post
TDA Posted January 10 Share Posted January 10 and what exactly does not work? In the constructor, the script compiles successfully ... Link to post
fejeena Posted January 10 Share Posted January 10 Just check the same, no errors in the CS. Link to post
TDA Posted January 10 Share Posted January 10 Well, I checked in the game, the scripts work, at least the control books-activators, in the beginning. But the workers don't do anything, they just wander ... Link to post
hamatank Posted January 10 Author Share Posted January 10 fejeena/ Yes, I have OBSE TDA/ Yes, the workers... but did you say they just wander? In my oblivion, they don't even show up... Did you do something with it? Link to post
TDA Posted January 11 Share Posted January 11 To start a business you need to have a trading level of 100. Could this be the case? Well, I went to the office and bought a corn farm, then went to the farm, and activated the controller book - to hire workers ... Then I got tired ... Link to post
hamatank Posted January 11 Author Share Posted January 11 My character is trading 100 already so that's not... So you mean you bought only one business... I bought all the business at one time. May be that's why it's not working. Thanks anyway. Link to post
hamatank Posted January 11 Author Share Posted January 11 Yeah! that was the problem. and I think the gold mine is not finished yet. Maybe the mod is abandoned because of this problem... Link to post
TDA Posted January 11 Share Posted January 11 well, I bought everything too ... but the workers do nothing. There was no interaction, and it became not interesting for me to explore the mod further. Link to post
fejeena Posted January 11 Share Posted January 11 The gold mine maybe works. Everything is in the mine. Also the book. But the mine cell door is not connected with the world door. So you can not enter the mine. You can fix it in the CS and then try if the mine works. esp with connected door and some TES4Edit cleaning and path grid in all cells. BXX Tamriel Resource Exchange clean.esp the problem with the "not moving workers" can be because there is no pathgrid in the cells "Stables Main Building" , "Fishery" , "Gold Mine" and "Farmhouse". Only the "Vinyard Storage" and "Tamriel Resource Exchange" cells had path grid. Link to post