symulator farmy 2011, landwirtschafts simulator 2011, symulator farmy, landwirtschafts simulator, dodatki
kombajny
przyczepy maszyny
mapy landwirtschafts simulator


Jesteś w: » Landwirtschafts Simulator - Farming Simulator - Symulator Farmy » Modyfikacje (ogólnie) » Modelowanie, programowanie » Programowanie modu od podstaw
Poprzedni temat «» Następny temat

Tagi tematu: modu, od, podstaw, programowanie

Autor Wiadomość
mafia573
modeluje w ac3d



Dołączył: 22 Lis 2009
Posty: 455


Znacznik tego postuWysłany: Sob 29 Sty, 2011 21:451 post w temacie




Jest gdzieś poradnik jak zaprogramować jakiś mod od podstaw, umie ktoś w ogóle wszystko od początku napisać jak tak to jak to zrobić ktoś by poradnik napisał.
Chce się trochę nauczyć.
dodatki landwirtschafts simulator Zobacz profil Napisz wiadomosc prywatna Wyslij email
 
 
 
mafia573
modeluje w ac3d



Dołączył: 22 Lis 2009
Posty: 455


Znacznik tego postuWysłany: Nie 30 Sty, 2011 14:412 post w temacie



No znajdę gdzieś taki poradnik :?:
_________________
Szukam zdjęć Z020 (Zagon) (ok. 1984) jak ktoś ma proszę o kontakt.

Modeluje w AC3D, konwertuję, trochę programuję. GG

Silver Fletcher (Pierce Silver Arrow) 1933r.
dodatki landwirtschafts simulator Zobacz profil Napisz wiadomosc prywatna Wyslij email
 
 
 
sledziu1995



Dołączył: 09 Sie 2010
Posty: 1151


Znacznik tego postuWysłany: Nie 30 Sty, 2011 15:053 post w temacie



sprawdż na yt
_________________
09 sierpnia 2011 pierwsze urodziny na ls2009.net
:-P
na forum wchodzę tylko okazjonalnie gdyż mieszkam poza domem i nie mam ciągłego dostępu do internetu
dodatki landwirtschafts simulator Zobacz profil Napisz wiadomosc prywatna
 
 
mafia573
modeluje w ac3d



Dołączył: 22 Lis 2009
Posty: 455


Znacznik tego postuWysłany: Pon 31 Sty, 2011 19:174 post w temacie



wolał bym w formie pisemnej
_________________
Szukam zdjęć Z020 (Zagon) (ok. 1984) jak ktoś ma proszę o kontakt.

Modeluje w AC3D, konwertuję, trochę programuję. GG

Silver Fletcher (Pierce Silver Arrow) 1933r.
dodatki landwirtschafts simulator Zobacz profil Napisz wiadomosc prywatna Wyslij email
 
 
 
Amazone



Dołączył: 11 Maj 2010
Posty: 420
Skąd: Rozmierz


Znacznik tego postuWysłany: Pią 08 Kwi, 2011 22:125 post w temacie



Też by mnie to interesowało. Bym sobie mody sam programował :-P
dodatki landwirtschafts simulator Zobacz profil Napisz wiadomosc prywatna Wyslij email
 
 
michas1970
||||||||||||||||||||



Dołączył: 19 Mar 2010
Posty: 4352
Skąd: okol. Torunia:))


Znacznik tego postuWysłany: Sob 09 Kwi, 2011 08:576 post w temacie



Nie ma takiego poradnika i wątpię że kiedykolwiek powstanie bo z programowaniem jest sporo zabawy po drugie jest tego sporo bo jak jeździsz traktorem w grze to to wszystko gdzieś musi być wpisane w odpowiedniej formie no i wreszcie jest konieczna znajomość języka C++ i LUA + dobrze operować językiem po angielsku
dlatego polecam wam analizowanie plików xml i lua modów
dodatki landwirtschafts simulator Zobacz profil Napisz wiadomosc prywatna
 
 
 
Adam 334



Dołączył: 09 Maj 2010
Posty: 356
Skąd: Tychów


Znacznik tego postuWysłany: Pią 15 Kwi, 2011 08:277 post w temacie



michas1970, a żeś módry.Tyle to każdy potrafi.Dobra tak przy okazjii to zdał by się taki poradnik.
_________________

Jeleń jest tylko jeden!
dodatki landwirtschafts simulator Zobacz profil Napisz wiadomosc prywatna Wyslij email
 
 
 
michas1970
||||||||||||||||||||



Dołączył: 19 Mar 2010
Posty: 4352
Skąd: okol. Torunia:))


Znacznik tego postuWysłany: Sob 30 Kwi, 2011 11:028 post w temacie



chcecie poradnik dam wam go ale będzie po angielsku co wy na to??

pss. translator wam tu nie wiele pomoże :lol:
dodatki landwirtschafts simulator Zobacz profil Napisz wiadomosc prywatna
 
 
 
cdplastyk
Super Moderator



Dołączył: 21 Kwi 2009
Posty: 1177
Skąd: Szczecin/ Resko


Znacznik tego postuWysłany: Pon 02 Maj, 2011 17:349 post w temacie



Z chęcią skorzystam. Angielski nie jest tak koszmarnie trudny. Dodaj go to wrzucę do FAQ
_________________
<b>Daj coś od siebie!</b>
ZANIM NAPISZESZ NOWY TEMAT KLIKNIJ!
Jeżeli jakiś post łamie regulamin powiadom o tym Moderatora/Administratora klikając .
NIE POMAGAM NA PW!- od tego jest forum!

dodatki landwirtschafts simulator Zobacz profil Napisz wiadomosc prywatna Wyslij email
 
 
Adam 334



Dołączył: 09 Maj 2010
Posty: 356
Skąd: Tychów


Znacznik tego postuWysłany: Pon 02 Maj, 2011 18:2310 post w temacie



Co do plików lua to mogę was trochę podszkolić.Wbrew pozorom to nie takie trudne.Wystarczy się tylko nauczyć kilku komend i trochę znać angielski.
_________________

Jeleń jest tylko jeden!
dodatki landwirtschafts simulator Zobacz profil Napisz wiadomosc prywatna Wyslij email
 
 
 
michas1970
||||||||||||||||||||



Dołączył: 19 Mar 2010
Posty: 4352
Skąd: okol. Torunia:))


Znacznik tego postuWysłany: Sob 07 Maj, 2011 00:3111 post w temacie



tutaj jest w zipie jest to z innej strony ale nie widziałem zakazu lecz nie wiem czy w środku nie ma reklam ale wątpię bo jest z jednego z oficjalnych for. sam poradnik jest natomiast napisany w pdf
a i przepraszm za pomyłkę kurs jest po niemiecku

http://www19.zippyshare.com/v/49350994/file.html
a jak byście chcieli to podrzucę wam parę skryptów lub ich podstaw
takie są:
    Utils
    FruitUtil
    Lua Script Files
    Vehicles
    AIVehicleUtil.lua
    Vehicle.lua
    VehicleAttachEvent.lua
    VehicleCamera.lua
    VehicleDetachEvent.lua
    VehicleEnterRequestEvent.lua
    VehicleEnterResponseEvent.lua
    VehicleLeaveEvent.lua
    VehicleLowerImplementEvent.lua
    VehicleMotor.lua
    VehiclePlacementCallback.lua
    WheelsUtil.lua
    Specializations
    AICombine.lua
    AICombineSetStartedEvent.lua
    AITractor.lua
    AITractorLowerImplementEvent.lua
    AITractorRaiseImplementEvent.lua
    AITractorRotateLeftEvent.lua
    AITractorRotateRightEvent.lua
    AITractorSetStartedEvent.lua
    AnimatedVehicle.lua
    AnimatedVehicleStartEvent.lua
    AnimatedVehicleStopEvent.lua
    Attachable.lua
    BaleLoader.lua
    BaleLoaderStateEvent.lua
    Baler.lua
    BalerAreaEvent.lua
    BalerCreateBaleEvent.lua
    BalerSetBaleTimeEvent.lua
    BalerSetIsUnloadingBaleEvent.lua
    Combine.lua
    CombineAreaEvent.lua
    CombinePipeParticleActivatedEvent.lua
    CombineSetChopperEnableEvent.lua
    CombineSetPipeStateEvent.lua
    CombineSetStrawEnableEvent.lua
    CombineSetThreshingEnabledEvent.lua
    Cultivator.lua
    CultivatorAreaEvent.lua
    Cutter.lua
    CutterAreaEvent.lua
    Cylindered.lua
    Fillable.lua
    Foldable.lua
    FoldableSetFoldDirectionEvent.lua
    ForageWagon.lua
    ForageWagonAreaEvent.lua
    Frontloader.lua
    Hirable.lua
    Honk.lua
    HonkEvent.lua
    ManureSpreader.lua
    Milktruck.lua
    Motorized.lua
    MouseControlsVehicle.lua
    Mower.lua
    MowerAreaEvent.lua
    PathVehicle.lua
    Plough.lua
    PloughAreaEvent.lua
    PloughRotationEvent.lua
    SetMotorTurnedOnEvent.lua
    SetTurnedOnEvent.lua
    Shovel.lua
    SowingMachine.lua
    SowingMachineAreaEvent.lua
    SowingMachineSetIsFillingEvent.lua
    SowingMachineSetSeedIndex.lua
    Sprayer.lua
    SprayerAreaEvent.lua
    SprayerSetIsFillingEvent.lua
    Steerable.lua
    SteerableSetSpeedLevelEvent.lua
    SteerableToggleLightEvent.lua
    SteerableToggleRefuelEvent.lua
    Tedder.lua
    TedderAreaEvent.lua
    TrafficVehicle.lua
    Trailer.lua
    TrailerToggleTipEvent.lua
    VehicleSetBeaconLightEvent.lua
    WindrowAreaEvent.lua
    Windrower.lua
    Triggers
    BarnMoverTrigger.lua
    BarrierTrigger.lua
    CoinTelescopeTrigger.lua
    GasStationTrigger.lua
    HotspotTrigger.lua
    InfospotTrigger.lua
    ManureShovelTrigger.lua
    MilktruckFillTrigger.lua
    MilktruckStartTrigger.lua
    PalletTrigger.lua
    ShopTrigger.lua
    SiloTrigger.lua
    SowingMachineFillTrigger.lua
    SprayerFillTrigger.lua
    TeleportTrigger.lua
    TipTrigger.lua
    VisualPlayerTrigger.lua
Ostatnio edytowany przez michas1970, dnia: Sob 07 Maj, 2011 00:38, w sumie zmieniany 4 razy   
dodatki landwirtschafts simulator Zobacz profil Napisz wiadomosc prywatna
 
 
 
Adam 334



Dołączył: 09 Maj 2010
Posty: 356
Skąd: Tychów


Znacznik tego postuWysłany: Nie 08 Maj, 2011 09:5312 post w temacie



michas1970 napisał/a:
BarnMoverTrigger.lua
dało by radę wrzucić?
_________________

Jeleń jest tylko jeden!
dodatki landwirtschafts simulator Zobacz profil Napisz wiadomosc prywatna Wyslij email
 
 
 
michas1970
||||||||||||||||||||



Dołączył: 19 Mar 2010
Posty: 4352
Skąd: okol. Torunia:))


Znacznik tego postuWysłany: Nie 08 Maj, 2011 15:1113 post w temacie



dał bym ci linka do tej strony ale to zapewne zostanie potraktowane jak reklama więc po ryzykować
hmm tak może być:
Kod:
 1  --
   2  -- Barn Mover Trigger
   3  --
   4  -- @author  Christian Ammann
   5  -- @date  29/12/08
   6  --
   7  -- Copyright (C) GIANTS Software GmbH, Confidential, All Rights Reserved.
   8 
   9  BarnMoverTrigger = {};
  10 
  11  local BarnMoverTrigger_mt = Class(BarnMoverTrigger);
  12 
  13  function BarnMoverTrigger:onCreate(id)
  14      g_currentMission:addUpdateable(BarnMoverTrigger:new(id));
  15      --print("created barn mover trigger, id: ", id);
  16  end;
  17 
  18  function BarnMoverTrigger:new(id, customMt)
  19 
  20      local instance = {};
  21      if customMt ~= nil then
  22          setmetatable(instance, customMt);
  23      else
  24          setmetatable(instance, BarnMoverTrigger_mt);
  25      end;
  26 
  27      instance.triggerId = getChildAt(id, 0);
  28      instance.triggerTargetId = getChildAt(id, 1);
  29      if g_currentMission:getIsServer() then
  30          addTrigger(instance.triggerId, "triggerCallback", instance);
  31      end;
  32      addTrigger(instance.triggerTargetId, "triggerCallbackTarget", instance);
  33 
  34      instance.barnMoverTriggerSound = createSample("barnMoverTriggerSound");
  35      loadSample(instance.barnMoverTriggerSound, "data/maps/sounds/cashRegistry.wav", false);
  36 
  37      instance.dirLength = 0.008;
  38      instance.dirX, instance.dirY, instance.dirZ = localDirectionToWorld(instance.triggerId, 0, 0, 1);
  39      instance.dirX = instance.dirX*instance.dirLength;
  40      instance.dirY = instance.dirY*instance.dirLength;
  41      instance.dirZ = instance.dirZ*instance.dirLength;
  42      instance.targetVelocity = 2;
  43 
  44      instance.touched = {};
  45 
  46      return instance;
  47  end;
  48 
  49  -- note: this is called as soon as the trigger entity is deleted



 
  50  function BarnMoverTrigger:delete()
  51 
  52      if g_currentMission:getIsServer() then
  53          removeTrigger(self.triggerId);
  54      end;
  55      removeTrigger(self.triggerTargetId);
  56 
  57      delete(self.barnMoverTriggerSound);
  58 
  59  end;
  60 
  61  function BarnMoverTrigger:update(dt)
  62 
  63      for k,touched in pairs(self.touched) do
  64          local vx, vy, vz = getLinearVelocity(k);
  65          local dot = vx*self.dirX + vy*self.dirY + vz*self.dirZ;
  66          local v = dot/self.dirLength;
  67 
  68          if v < self.targetVelocity then
  69              local scale = dt*touched.mass;
  70              addForce(k, self.dirX*dt, self.dirY*dt, self.dirZ*dt, 0, 0, 0, true);
  71          end;
  72      end;
  73 
  74  end;
  75 
  76  function BarnMoverTrigger:triggerCallback(triggerId, otherId, onEnter, onLeave, onStay)
  77 
  78      if onEnter then
  79          local touched = self.touched[otherId];
  80          if touched ~= nil then
  81              touched.count = touched.count+1;
  82          else
  83              local mass = getMass(otherId);
  84              self.touched[otherId] = {mass=mass, count=1};
  85          end;
  86      elseif onLeave then
  87          local touched = self.touched[otherId];
  88          if touched ~= nil then
  89              if touched.count > 1 then
  90                  touched.count = touched.count-1;
  91              else
  92                  self.touched[otherId] = nil;
  93              end;
  94          end;
  95      end;
  96 
  97  end;
  98 
  99  function BarnMoverTrigger:triggerCallbackTarget(triggerId, otherId, onEnter, onLeave, onStay)



 
 100 
 101      if onEnter then
 102          -- this happens, if a compound child of a deleted compound is entering
 103          if otherId ~= 0 then
 104              local object = g_currentMission:getNodeObject(otherId);
 105              --local isStrawbale = getUserAttribute(otherId, "isStrawbale");
 106              --local isHaybale = getUserAttribute(otherId, "isHaybale");
 107 
 108              self.touched[otherId] = nil;
 109              --if (isStrawbale ~= nil and isStrawbale) or (isHaybale ~= nil and isHaybale) then
 110              if object ~= nil then
 111                  if object:isa(Bale) then
 112                      if self.barnMoverTriggerSound ~= nil then
 113                          playSample(self.barnMoverTriggerSound, 1, 1, 0);
 114                      end;
 115 
 116                      if g_currentMission:getIsServer() then
 117                          --print("Bale stored: ", tostring(otherId));
 118                          local difficultyMultiplier = 2 ^ (3 - g_currentMission.missionStats.difficulty);
 119                          local baseValue = object:getValue(); --400;
 120                          --if isHaybale ~= nil and isHaybale then
 121                          --    baseValue = 800;
 122                          --end;
 123                          g_currentMission:addSharedMoney(baseValue * difficultyMultiplier);
 124                          object:delete();
 125                      end;
 126                      if g_currentMission.baleCount ~= nil then
 127                         g_currentMission.baleCount = g_currentMission.baleCount + 1; -- for straw elevator mission
 128                      end;
 129                  elseif not object:isa(Vehicle) then -- do not delete vehicles, but everything else
 130                      if g_currentMission:getIsServer() then
 131                          object:delete();
 132                      end;
 133                  end;
 134              else
 135                  if g_currentMission.nodeToVehicle[otherId] == nil then
 136                      -- there is nothing that could end up here, since physics objects are an object, thus this could only introduce bugs
 137                      --delete(otherId);
 138                  end;
 139              end;
 140 
 141          end;
 142      end;
 143 
 144  end;

postaram się wszystkie spakować i wrzucić na forum w najbliższym czasie
Ostatnio edytowany przez michas1970, dnia: Nie 08 Maj, 2011 15:13, w sumie zmieniany 1 raz   
dodatki landwirtschafts simulator Zobacz profil Napisz wiadomosc prywatna
 
 
 
przemo222



Dołączył: 01 Maj 2011
Posty: 336
Skąd: minsk mazowiecki


Znacznik tego postuWysłany: Nie 08 Maj, 2011 22:0014 post w temacie



kogo nauczyc programowac :mrgreen: :?:
_________________
kto gra w Minecraft
dodatki landwirtschafts simulator Zobacz profil Napisz wiadomosc prywatna Wyslij email
 
 
 
GucioLS



Dołączył: 10 Gru 2010
Posty: 98
Skąd: Łódź


Znacznik tego postuWysłany: Sro 18 Maj, 2011 16:3915 post w temacie



Jaaa!!! W programowaniu to tylko o to chodzi by podmienić model starego taktora na nowy i indexy poustawiać
_________________
Modeluje - Programuje - Konwertuje

http://www.psptube.pl/index.php?ap=56655

"klik" Z góry dziękuję!
dodatki landwirtschafts simulator Zobacz profil Napisz wiadomosc prywatna
 
 
 
Wyświetl posty z ostatnich:   








Przeskocz do:  

Jesteś w: » Landwirtschafts Simulator - Farming Simulator - Symulator Farmy » Modyfikacje (ogólnie) » Modelowanie, programowanie » Programowanie modu od podstaw


Kontakt | Regulamin | O grze | Mapa forum | FAQ | Tagi tematów
1.2.8
Grupa FS MODS © 2009 Wszelkie prawa zastrzeżone
phpBB by Przemo