Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Help with Models

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Advanced Tactics Series >> Mods and Scenarios >> Help with Models Page: [1]
Login
Message << Older Topic   Newer Topic >>
Help with Models - 5/25/2016 4:45:13 PM   
Ormand


Posts: 607
Joined: 2/17/2009
Status: offline
Vic,
I was wondering if you could answer several questions regarding models (and some event functions). Sorry, this will be fairly long, with lots of questions to clarify things.
I'm trying to figure out several aspects of them. I have managed to get models working in my mod, but to tell the truth, I am not exactly sure how. I started this process by working to convert NewDawn over to NewDawn2 (all vanilla) primarily by brining in all the pieces into NewDawn from 2. What I don't understand is that I did tried doing this incrementally. I started with just light tanks. I imported all the string lists and events, and then started up. This did not work. When I tried to create a light tank model, I got an error that was basically the same I got before, which was a subscript out of bounds while running MakeNewSFTypeModel. This message:

************** Exception Text **************
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at WindowsApplication1.DataClass.AddSFType()
at WindowsApplication1.ProcessingClass.MakeNewSFTypeModel(Int32 sftypenr)
at WindowsApplication1.SFDesignWindowClass.HandleMouseClick(Int32 x, Int32 y, Int32 b)
at WindowsApplication1.PlayScreenClass.HandleMouseClick(Int32 x, Int32 y, Int32 b)
at WindowsApplication1.Form1.Form1_Mousedown(Object sender, MouseEventArgs e)
at System.Windows.Forms.Control.OnMouseDown(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

What I don't understand is that once I entered ALL tank models, medium, heavy, tankdestroyer, etc., it worked. I can't see anything that would cause this. Other than perhaps the SFT maker doing something with all SFTypes of the same type, e.g., armor. This has me confounded. But, once I put all the types in, it works, and it also worked in my Divisions mod as well. What concerns me is that the incremental approach did not work at all, so I am not sure what went wrong, or what to fix. I have to say that at times, I also did find that in the editor some of the data under "Models 1", such as ModelItemType" or "ModelResearch" changed while I was editing. For example, I would edit something, like add another model, go back, and notice that the research panel had changed. This was all for NewDawn with no mods. They are all set correctly when I start a game and get this error.

1. Some general questions about how models are made. Some of these are because I haven't had that much experience playing with them, since I only just got it working.
a. When the model is created, is made from a base at the current Tech base. So, if I have "Medium Tank III", will the new SFT be created with the Medium Tank III stats? Which the creation event then modifies.
b. Does the new model also make a new Item that is tied back to this SFT? Which seems to be the only way it could be made since it shows up in the list of items to be produced. Is this Item probed with CheckSFTypeItem? If it is a new Item, is it possible to modify the Item properties (besides cost) in the editor, such as resource costs, and XpMod, MorMod, etc.?
c. Are models fixed by their tech type? Or are they upgradable? By this I mean from I -> II -> III -> IV. I see that one can upgrade a model via the research Tank Combat I-VIII, Tank Anti-Infantry I-VIII, and Tank Mobility I-VIII. Sorry, I just haven't gotten this far with models in a game yet. I suppose it should be possible to upgrade the produced unit in the field, but not the model. Basically, you should have to make a new one.
d. I presume all these different models of course apply to the 8 SFT limit in a unit.

2. In the creation event, which has the loop over TempVar0 FROM 0 TO TempVar7. Is TempVar7 the research level for the type that is specified in the "Models 1" panel? Thus, for Light Tank I, II, III, and IV, would it be 0, 1, 2, 3? I am trying to understand if this is the way levels via technology come in. Because I see that it runs through the possible modifications TempVar7 times. But, per question 1, is this on the stats for Light Tank II, I, III, or IV, depending on the tech level?

3. Events: How does one use the CheckSFTypeVar and ExecSFTypeVar events? Actually, what are the Vars? I presume these are all the variable defining the SFT. Such as all the dat on the Statistic 1 & 2 tabs, Fuel, and Combat Lanscape Mods pages. Can you provide a list? Or is it perhaps as simple as starting on Statistics 1 page to the left, and working down the pages? I am mostly interested in things that are unit attributes, like movement type, supply, carry capacity, recon, zoc, paradrop, number of attacks, and all the Combat LandScape Mods.

4. Is it possible to make the Std. base models unbuildable for a human player? Namely, force them to use models. Is it possible to create a model via an event? For example, say I wanted to create a light tank model for the player before the game started?
Post #: 1
RE: Help with Models - 5/26/2016 7:32:15 AM   
Ormand


Posts: 607
Joined: 2/17/2009
Status: offline
OK, I've worked some stuff out by just doing things, and trying to print. In case anyone wants to know.

2. TempVar7 in Event 96 is the tech level in the Models 1 panel.

1.a. All models are created on the base SFT, namely Light Tank I for light tanks. This is true even if you have Light Tank II research. The loop up to TempVar7 in question 2 "improves" the power points and hit points by looping over the tech level and incrementing. The creation event starts with the stats down by 15%, and there is a 34.81% chance it stays down 15%, a 48.38% chance it stays the same, and a 16.81% chance it goes up by 15%, for each level, and for each of the following: attack and defense power points, and attack and defense hit points. A level II model is NOT built on the Std. SFT II base SFT. Thus, there is a 12.81% chance some stats will be 15% worse than Std. SFT I. For tank models, though, the new model algorithm affects the power points as well, and in vanilla, these do not change very much from level I -> level II in the Std. Model. So, there is a good chance that your vehicle will have more powerpoints as you increase you increase the tech level.

1.b. Yes, it creates a new item for construction as expected. And, CheckSFTItem(TempVar9) returns the item number. TempVar9 is passed to event #96 during the creation of the new SFType, and is the new SFType number.

1.c. The models are upgradable. Namely Boris I -> Boris II. The SFType stays, but it is not buildable. You can still compare it. Improvements are automatically put into models created after the improvement is researched.



A new issue in ANewDawn2. It looks like research Tank Combat III-VII, Tank Anti-Infantry I-VIII, and Tank Mobility I-VIII are twice as expensive for German people. They are the same only for Tank Combat I-II.

(in reply to Ormand)
Post #: 2
RE: Help with Models - 5/26/2016 4:17:05 PM   
Ormand


Posts: 607
Joined: 2/17/2009
Status: offline
3. As near as I can tell, there are 100 (0-99) variables accessible by Check(Exec)SFTypeVar, but they are all set to 0. And I don't know if they do anything.

(in reply to Ormand)
Post #: 3
RE: Help with Models - 5/27/2016 5:37:47 AM   
Ormand


Posts: 607
Joined: 2/17/2009
Status: offline
3. OK, should have looked at Check events. I thought about this this AM, the SFTypeVar are used for alterations. To see an alteration is possible.

I guess several days of digging gets most of those questions.

Kind of like Gary's posts, I was wanting to use models to also make different types of infantry, such as mountain and marines, even paratroopers. The idea being that I could make fewer SFTs that the AI would never use. But, this would require modifying more than just the power and hitpoints. I suppose I could possibly do this with a dummy SFT. Any suggestions.

(in reply to Ormand)
Post #: 4
RE: Help with Models - 5/27/2016 7:10:47 PM   
GaryChildress

 

Posts: 6756
Joined: 7/17/2005
From: The Divided Nations of Earth
Status: offline
Sounds like a great idea to me. Wish I knew how to use the event editor.

Maybe you or someone could put together a basic tutorial on the fundamentals of how events work? Just a thought.

_____________________________


(in reply to Ormand)
Post #: 5
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Advanced Tactics Series >> Mods and Scenarios >> Help with Models Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.148