![]() |
|
#1
|
|||
|
|||
![]()
<sigh>
another example of "scripting examples scattered across this and other forums". Sigh yourself and read more carefully please, you asked for a more central place. Ideas are the central places, we lure them in with challenges ![]() Everyone has their favourite website Yes and SimHQ is the premier site for combat flight-sim fans for many years since CombatSim went commando ![]() Are you really going to trawl even this forum website, pick up on all the questions and answer them somewhere else and post links to those answers? Of course. I don't expect it to be easy going in the early days. We've already done this with RoF and we got there eventually didn't we ![]() I know next-to-nothing but I know enough to spot forums where good information is being posted, Kodiak here and FearlessFrog over there. I can spot talent ![]() I do not call it trawling that's disrespectful, these are good friendly and informative sites. I call it gathering intel. See cast your bread upon the waters mentioned earlier. I've scattered a breadcrumb trail from here to SimHQ, that'll do for a start what's the rush ![]() Ming |
#2
|
||||
|
||||
![]() Quote:
A central place is singular - ONE place not several places. My point about code being "spread around" is just that. You think SimHQ is the place, Gamekeeper thinks airwarfare.com is the place. We haven't heard from fans of all the other places yet! I happen to think the home of CoD is the place but I'd accept any one place. That calls for agreement, co-operation and leaving the egos at the door when you enter. By the way Trawling means "go through and search" and is not disrepectful. It doesn't mean Trolling which may be the way you read it.
__________________
klem 56 Squadron RAF "Firebirds" http://firebirds.2ndtaf.org.uk/ ASUS Sabertooth X58 /i7 950 @ 4GHz / 6Gb DDR3 1600 CAS8 / EVGA GTX570 GPU 1.28Gb superclocked / Crucial 128Gb SSD SATA III 6Gb/s, 355Mb-215Mb Read-Write / 850W PSU Windows 7 64 bit Home Premium / Samsung 22" 226BW @ 1680 x 1050 / TrackIR4 with TrackIR5 software / Saitek X52 Pro & Rudders |
#3
|
|||
|
|||
![]()
airwarfare.com kindly offers convenient file storage and we can ask the mods to make a sticky with this link.
1C is the most popular site so far with the most developed subsection structure even compared to excellent simhq (which I learned about upcoming original IL-2 beta from btw ![]() We can ask mods to make another subsection for sample scripts in this section. However people will want to discuss them. And people will post their requests for new scripts in that section. And people will ask questions about not working triggers, etc. in that section. Thus that section would eventually duplicate this one. The most interesting samples are the ones that are included inside the missions and campaigns posted here in the FMB section. For instance most of the functionality mentioned above can be found in the 1st stillborn's mission running on Repka #3 and posted here. The best way to learn is to download all the missions from this section and study how they work from the inside. Many scripts have comments in them. To make step by step instructions even for basic C# operations/methods usable in CloD would be a full-time job for a small team of programmers because there is literally no borders or limits to what can be done. (Don't you want to fly a recon mission and actually report enemy units pos to your bombers for instance? Or ... etc. etc. etc... ?) IMO the issue is not lack of samples (there are plenty of them posted here) but the fact that it is not enough to just copy-paste them to make them work. Some basic knowledge of C# in needed. In April-May I asked the devs and C# experts to make a script library myself but after reading naryv's samples (reposted here, you should find all of them) ended up buying the shortest book on the subject I could find called "C# beginners' course" which allows to understand how to make various scripts work together. I highly recommend starting with a similar book or a free Internet course and use it as a dictionary while studying stillborn's, naryv's and all other scripts posted here. Samples or even the FMB manual would not help without understanding C# basics unfortunately. ...and visa versa if you understand C# basics than neither samples nor the manual would be needed, just some help and advice on particular issues which can be easily obtained on these forums. Last edited by Ataros; 09-23-2011 at 07:39 PM. |
#4
|
|||
|
|||
![]()
Ataros is right on the money.
C# is a programming language that many people use to earn a living, it's not a gaming tool. There's no way around it, until someone codes a graphical front-end for the most basic stuff(and even that would be limited to the most commonly used functions) it's going to take investment of personal time and learning how to code to do things. |
#5
|
|||
|
|||
![]()
To make step by step instructions even for basic C# operations/methods usable in CloD would be a full-time job for a small team of programmers
I'm not sure that you're getting it. The subtle counter-intelligence thing I mean ![]() Cards on the table then. We know that Kodiak can do all this stuff we need to find out about, if we're gentle and coaxing we might get a tutorial, just one person with knowledge and prepared to share can make a big difference For example many of us have used 3D tutorials to learn 3D work from online tutorials it's our heritage - people in the communities helping others. We worked out how the RoF FMB worked and shared/pooled our knowledge... http://riseofflight.com/forum/viewtopic.php?f=64&t=348 We don't need a team of professionals, we already have enough savvy people around to create tutorials - look at Vanderstok's RoF FMB-tutorial videos http://riseofflight.com/forum/viewto...ers+vanderstok Can everybody please concentrate and allow Kodiak to find out that he is needed and there is an international audience waiting to buy cold beers for him ![]() It's not the C# that's the problem, that's simple because all the unknowns are known, we just read a book and Hello World arrange the parts. It's the not-knowing how most of the CoD FMB pieces fit together because we have no documentation. If CoD documentation is going to be RoF all over again then someone needs to ask the wise man for help while trying not to actually grovel ![]() We're not wanting to make any conditions or to be too demanding, just chatting on a user forum where the Great Bear is prowling... Do I make myself clear without belabouring it ![]() if you understand C# basics than neither samples nor the manual would be needed, just some help and advice on particular issues which can be easily obtained on these forums How can I detect that a damaged plane in an RTB-ing four-flight is inbound to the airfield to possibly make a crash landing? Detect the plane passing some distance-radius from the runway let's focus on that I'm taking you at your word as I know enough about C# to type in the solution. When you've found it and I quote easily ![]() We don't know "It's what we don't know we don't know..." exactly what we need to know to master the CoD FMB but - don't ask, don't get. But on the other hand we must always be making concrete cases and asking for worked examples to make life easier for our tutors, focus. Being Russian or German first-language is of course making distribution of information difficult for us all in the beginning, we must encourage our German and Russian friends to help English-localise posted German and Russian FMB tutorials. They're ahead of the game and why not ![]() Ming |
#6
|
|||
|
|||
![]() Quote:
Code:
protected AMission () public virtual void Init (maddox.game.ABattle battle, int missionNumber) public virtual void Inited () public virtual bool IsMissionListener (int missionNumber) public virtual void OnActorCreated (int missionNumber, string shortName, maddox.game.world.AiActor actor) public virtual void OnActorDamaged (int missionNumber, string shortName, maddox.game.world.AiActor actor, maddox.game.world.AiDamageInitiator initiator, part.NamedDamageTypes damageType) public virtual void OnActorDead (int missionNumber, string shortName, maddox.game.world.AiActor actor, System.Collections.Generic.List <DamagerScore> damages) public virtual void OnActorDestroyed (int missionNumber, string shortName, maddox.game.world.AiActor actor) public virtual void OnActorTaskCompleted (int missionNumber, string shortName, maddox.game.world.AiActor actor) public virtual void OnAiAirNewEnemy (maddox.game.world.AiAirEnemyElement element, int army) public virtual void OnAircraftCrashLanded (int missionNumber, string shortName, maddox.game.world.AiAircraft aircraft) public virtual void OnAircraftCutLimb (int missionNumber, string shortName, maddox.game.world.AiAircraft aircraft, maddox.game.world.AiDamageInitiator initiator, part.LimbNames limbName) public virtual void OnAircraftDamaged (int missionNumber, string shortName, maddox.game.world.AiAircraft aircraft, maddox.game.world.AiDamageInitiator initiator, part.NamedDamageTypes damageType) public virtual void OnAircraftKilled (int missionNumber, string shortName, maddox.game.world.AiAircraft aircraft) public virtual void OnAircraftLanded (int missionNumber, string shortName, maddox.game.world.AiAircraft aircraft) public virtual void OnAircraftLimbDamaged (int missionNumber, string shortName, maddox.game.world.AiAircraft aircraft, maddox.game.world.AiLimbDamage limbDamage) public virtual void OnAircraftTookOff (int missionNumber, string shortName, maddox.game.world.AiAircraft aircraft) public virtual void OnAutopilotOff (maddox.game.world.AiActor actor, int placeIndex) public virtual void OnAutopilotOn (maddox.game.world.AiActor actor, int placeIndex) public virtual void OnBattleInit () public virtual void OnBattleStarted () public virtual void OnBattleStoped () public virtual void OnCarter (maddox.game.world.AiActor actor, int placeIndex) public virtual void OnMissionLoaded (int missionNumber) public virtual void OnPersonHealth (maddox.game.world.AiPerson person, maddox.game.world.AiDamageInitiator initiator, float deltaHealth) public virtual void OnPersonMoved (maddox.game.world.AiPerson person, maddox.game.world.AiActor fromCart, int fromPlaceIndex) public virtual void OnPersonParachuteFailed (maddox.game.world.AiPerson person) public virtual void OnPersonParachuteLanded (maddox.game.world.AiPerson person) public virtual void OnPlaceEnter (maddox.game.Player player, maddox.game.world.AiActor actor, int placeIndex) public virtual void OnPlaceLeave (maddox.game.Player player, maddox.game.world.AiActor actor, int placeIndex) public virtual void OnPlayerArmy (maddox.game.Player player, int army) public virtual void OnPlayerConnected (maddox.game.Player player) public virtual void OnPlayerDisconnected (maddox.game.Player player, string diagnostic) public virtual void OnSingleBattleSuccess (bool success) public virtual void OnTickGame () public virtual void OnTickReal () public virtual void OnTrigger (int missionNumber, string shortName, bool active) public virtual void Timeout (double sec, maddox.game.DoTimeout doTimeout) public maddox.game.ABattle Battle {get;} public maddox.game.IGamePlay GamePlay {get;} public int MissionNumber {get;} public int MissionNumberListener {set; get;} public maddox.game.world.ITime Time {get;} Another way is to use onTrigger method with really big trigger radius around an airfield and check what aircraft parts are damaged. There was a sample script posted in the main section that prints out damaged parts to a chat window. Therefore I guess it is possible to do this. The 3rd alternative could be to combine both of the above ways and flag a damaged group OnAircraftDamaged and then onTrigger check if the incoming group is flagged as damaged. Again I do not know C# and can be wrong. It is better to start a new thread with these particular questions where real experts will offer their solutions. hc_wolf combined several naryv examples and others' scripts into one mission. You can have a look at how he did this and do the same if you know C#. If no one can answer questions on this forums you can ask naryv directly as adonys did in this thread http://www.sukhoi.ru/forum/showthrea...=1#post1647624 Sometimes naryv does not answer if the functionality requested is not ready yet or does not work properly or is changing at the moment. All script methods are WIP I think ATM. We will not see the manual till engine functionality and script methods are 90% finalized imho because there is no point to spend time on a manual that will not be valid in 2 months. I expect it to come with Battle for Moscow at the earliest. But again if you know C# you can find all necessary information on this forums in naryv, adonys, Kodiak, Wolf, TheEnlightenedFlorist, vetochka, stillborn, etc. examples. Scripting discussion was started 5 months ago in this thread (Yes, I know it is hard for the first 6-8 weeks till you learn some basics ![]() Many of my noob's questions were answered there by С# programmers. Again this forum section has more then enough information to start programming for CloD if you know C# basics at least. Guys and a lady mentioned above have proved it many times already. This forum section is only 9 pages long not too much to look though to get all the information needed to be able do the same imho. ps. Of cause I would be more than happy if Kodiak or other C# programmers agree to publish some tutorials but for me it is not clear if the tutorials should be about C# basics or about CloD methods and functions. Last edited by Ataros; 09-24-2011 at 09:15 AM. |
#7
|
|||
|
|||
![]()
Lovely to see things looking up
![]() How to construct an AirfieldEmergency script from first principles while explaining the steps, that's what I'd like to see. A concrete example with commentary that's fairly simple (if the detecting of the damaged plane crossing the AlarmRadius can be done) There's almost 800 references to Maddox functions, classes, methods and wotnot so I'm imagining that it's on There's the introductory part to a script, where databases of functions, subroutines (BASIC/Visual Basic) we will need access to in the running script, these might be- using System; using System.Collections.Generic; using maddox.game; using maddox.game.world; using maddox.GP; The script then begins and it's at this point that we pupils need statements commented please. We can figure out what each line of code means but it's like examining atoms without knowing about the Table of Elements. We can see that they're all different and they all must mean something, there must be some rhyme to it, we are not idiots ![]() 'We need this line to see if any planes are already in the mission' (the mission designer created an unknown number of planes) 'We need this line to step through each plane to see if it is damaged' (all planes in all running missions can be checked) 'This line instantiates/spawns a plane/vehicle at this XYZ position' (if the position is clear) This scripter's commentary gives us a chance to ask the scriptwriter a sensible question... it's very difficult to ask sensible questions without a handle to hang the question on. For example how can you tell if a possible spawning position is clear of obstructions. But that's another story probably ![]() Ming |
#8
|
|||
|
|||
![]()
Wow thanks very much for your collection Ataros!
It is better to start a new thread for each new module you need Wiil do, thanks they just looked [FMB stuff] up Kodiak works/worked for Maddox perhaps - this is a compliment btw. He/she definitely knows his stuff. Let's face it somebody has to ![]() onTrigger method with really big trigger radius around an airfield A trigger radius hmm - thanks ![]() Thinking out loud then- two airfields say Croydon and Biggin Hill and my single plane taking off at one airfield. Testing the other airfield's EmergencyAlert (procedure) - with a simple onscreen message if my plane trips the second airfield's trigger. Baby steps. Adding the trigger in a script rather than via the FMB, to make it universal. Does the FMB write trigger code into the dot cs I wonder. I know that airfields have one radius and then another radius Ming |
#9
|
||||
|
||||
![]() Quote:
I am familiar with the basic principles of coding even though it is from years of Visual Basic and VBS not C#. We can see from the .cs files that they are fundamentally modular leading to the possibility of module examples in response to requests and other examples simply posted by people who have already developed them. Yes, that calls for the patience and good will of the knowledgeable guys who would essentially be filling a void left in the game application. What I had hoped for was a bank of these modules with a basic very brief explanation of their purpose so that we could interpret, learn to understand and use. Studying existing modules is one way but is long and laborious as you first have find one that may contain what you want, understand what the script module is trying to do and you still may not find what you are looking for. There are many methods and objects etc created in the Maddox game that are unknown to many of us. Some are confusing such as 'Actor' meaning Aircraft (as far as I can make out) not 'Player'. Some of our 1C friends know these and are in a position to help and advise. I spent a lot of time in my career teaching people various subjects at various levels from electronic maintenance to business management. One of the dangers of those doing the teaching, or presenting examples/guides, is that they see things from 'the inside looking out' instead of where their pupils are, 'on the outside looking in' and often into a dark black box of a world they just don't know about yet. We tend to assume that if we are familiar with a concept or a detail which is so basic to us, we take it for granted that our 'pupils' will already have that knowledge. So jargon, assumed knowledge etc lead to a gulf between what is being presented and what is being received. Some my my maintenance pupils didn't need to be electronics experts to understand and fault find modular equipment on an oil rig in the middle of the Gulf, they just needed to know how to piece information and blocks together to fix and get something working. We don't all need to be top-level C# programmers for CoD, we do need to understand basic principles (which can be read up or learned) and then have the support of those around us on the Maddox game-specific aspects and how they are used. My hope was to open up the Maddox coding world to semi-laymen like myself. It may not reach all players but I think it would open up mission coding for quite a few. Of course I could study C# in great depth, then find and study all the aspects of the Maddox game but frankly I'm not willing to spend that much time on it. If the FMB didn't give us a graphical means of creating very basic missions I wouldn't be bothering with making them as I'd no doubt have to study even more. Its not that I want an easy path, just an easier path than we have at the moment. No, wait, I do want an easy path, I didn't buy this game to have to study programming in order to use it! I wonder what level the SDK will be pitched at, whether there will be graphical interfaces and whether it will be for maps, for aircraft or even mission building. Lets face it, these things will fall on a very few shoulders if its all bare coding and will deny the rest of us those opportunities which I see as a fundamental part of what I have bought. Anyway, a 1C-forum coding library isn't going to happen. Getting people to agree on a single solution is harder than learning C#. I guess I am just over-optimistic, after all if I wasn't I'd have dumped CoD and followed the majority of my Squadmates who have given up on CoD and bogged off into RoF.
__________________
klem 56 Squadron RAF "Firebirds" http://firebirds.2ndtaf.org.uk/ ASUS Sabertooth X58 /i7 950 @ 4GHz / 6Gb DDR3 1600 CAS8 / EVGA GTX570 GPU 1.28Gb superclocked / Crucial 128Gb SSD SATA III 6Gb/s, 355Mb-215Mb Read-Write / 850W PSU Windows 7 64 bit Home Premium / Samsung 22" 226BW @ 1680 x 1050 / TrackIR4 with TrackIR5 software / Saitek X52 Pro & Rudders |
#10
|
|||
|
|||
![]() Quote:
Now there are plenty of examples and missions posted in this section. Of cause it is not easy to find them if you did not follow the discussion from April. It takes time, weeks and months, to learn something new. If you tell what modules you would like to use in your mission I will try to tell you in which threads/examples they are available. It is better to start a new thread for each new module you need. Kodiak and other people knowing C# are very helpful and helped me a lot even back in April not having any manual (they just looked up lists of methods, etc. from .dll files in Visual Studio): Quote:
![]() Last edited by Ataros; 09-24-2011 at 09:44 AM. |
![]() |
Thread Tools | |
Display Modes | |
|
|