Jump to content

MountainMan90

Members
  • Posts

    16
  • Joined

  • Last visited

Posts posted by MountainMan90

  1. This gonna be the greatest thing ever if it does come out, for one simple reason: No more need to load the mod to know if everything is correct syntactically.

     

    If it is a logical error, then there would unfortunately be no way to test in a compiler.

     

    I've tried the German SDK previously. It was very helpful in assisting my understanding of Em4 scripting, and helped me apply my computer science background into the game. I suddenly understood what were variables for the game, functions that the game used, and that I could create structs, custom functions, and enums too. Really helped me start my freeplay based mission script.

     

    The feature I'd like to see would be the ability to 'trace' (debugging is the proper word I think) variables and their status for example. I'd like to be able to keep track of them so I can see if there are any possible logical errors in the script. It would work well for instances where 'common' variables like int and float would be used. Int values especially for me are something I'd like to see being traced, due to how often they see use in for-loops.

     

    I can guarantee that this is going to be released. I will add the feature to the list, it shouldn't in theory be hard but as you know: If it seems simple - its not. 

     

    Well, I was starting to try to learn scripting but ill just wait till this version comes out first then  :P

     

    But, is it possible to have it like sublime, you can type a few basic things, and then press a key (for example tab), and then the long version comes, would work with a if for example,

     

    Edit:

    So for example "if"  would go to

     

    if (condition) {

     

    }

     

    "elseif" 

     

    if (condition) {

     

    } elseif (condition) {

     

    }

     

    Etc.

     
     
    Yeah that wouldn't be hard at all, it is almost like how the intellisense is. 
     
     

     

    Best idea ever! 

     

    I have no experience with scripting outside of Emergency but if you need something I would love to help 

    You can find the Emergency 4 SDK here: http://www.emergency-forum.de/filebase/index.php?entry/1658-emergency-4-sdk/

     

    Off topic: I am a fan of your work! I really wasn't expecting this to catch your eye,

     

    On topic: Thanks for linking me the SDK, would you like to test the pre-release? I would send you the source code and you can review it to make sure nothing malicious is in it and compile and test.

     

    UPDATE:

    I honestly never expected to get this kind of good response so the development will go into full force adding features that you guys would like to have. The intellisense is starting to take form as we speak, probably a few days eta so that I can ensure there is no bugs.

  2. Depending on how advanced the program perhaps a similar feature to programs like Visual Basic where the program predicts what you will likely type and offers suggestions? That speeds up my programming hugely not sure if it's possible though would require some advanced stuff

     

    Yeah Intellisense, that is being worked on right now as we speak. It would have other features such as refactoring(renaming). The part that will be the most difficult will be the script 'compiler' - the amount of time that will take is going to be pretty big because I have to make sure that it is working 100% or it will give false positives.

  3. Important: This IDE will be open source and anyone can feel free to add and remove features how they see fit as it complies with the GNU GPL V2 licensing on release.

     

     

     

     

    Introduction:

     

     

    Hello everyone, I am MountainMan90. I have been lurking on these forums for years before I decided to make an account. I am a freelance software engineer and volunteer firefighter here in the state of Vermont.

     

     

     

     

     

    About:

     

     

    The motivation for writing this software is simply because the current IDE's for writing mods currently is below standards(little to no documentation, little to no intellisense, ect). I did find one IDE for writing scripts on the German forum, however I speak very little German and I didn't want to reverse engineer the IDE to only rename everything into English as it was a waste of time and would violate the programmers work.

     

     

     

     

     

    Current features:

     

     

    - Basic syntax color/highlighting

     

     

    - Basic project tree navigation

     

     

     

     

     

    Planned features:

     

     

    - Advanced intellisense

     

     

    - Basic script 'compiler'(parser to ensure script will work)

     

     

    - More eye candy (UI more easier on the eyes)

     

     

    - And anything you guys would like to see added.

     

     

    - Debugging variables and allowing you to trace them.

     

     

    Current state:

     

     

    PRE Alpha (0.0.1)

     

     

     

     

     

    Licensing:

     

     

    GPL V2(http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)

     

     

    Update 4/23/16:
    - Code completion
    - Intellisense
    - Multiple tabs
    - Ability to start a new mod project within the editor
    - Ability to open a existing mod project within the editor
    - Basic parsing to ensure that the mod will run without error
    - Tracking of variables within the mod (int, double, String, ect.)

    What I am still working on:
    - Parsing the mod to look for memory leaks
    - Advance parsing 'compiling' of the mod.

    New pictures will be coming tonight!

     

     

    Pictures:

     

     

     

     

     

    7pljz1c.png

     

  4. Great news everyone. Itchboy was able to isolate the mod's performance issues to the Civil Car Pack, as well as a few other smaller things. This means the lag everyone was experiencing has more or less been fixed!

     

    I will be taking over development for a while and getting things looking pretty and filling in some gaps here and there. We will then move forward with a beta, and eventually a release. The biggest hurdle has been cleared.

     

    This new build was tested, and performed well, on a computer with a Pentium dual-core processor and integrated nVidia graphics chip. So all those with lower-end PCs, to an extent, should be able to run the next release of the mod smoothly. :)

     

    Awesome to read this. A while back I was helping to pinpoint issues and giving some fixes to Itch. One of the issues I found was a car path issue. Nonetheless, I look forward to trying out the new version.

  5. Most likely has something to do with your Intel integrated graphics.

     

    To a point, you are correct. I am able to play some insanely fun and current games with my Intel Integrated graphics card. Their are some memory issues for this release, which you can see further back I have rewrote snippets for them. Such as it would cycle throughout the entirety of the volunteer's until it cycled to the one it needed to spawn. Furthermore their is a issue that crashes the game with one of the firefighters attempts to leave the map - it gets blocked.

    Again, very good mod. Good job team.

  6. Adding the break in the way you did to the loop negates the need for the for-loop. The way you used it essentially breaks out of the for-loop on the first iteration. You might as well forego the loop and just say car = vl8.getGetVehicle(0);

     

    The way I did it was a quick, dirty and cheap way of handling volunteer spawning, which took 2 minutes to do(if that). It was meant to cycle to the unit requested and spawn the volunteer's required and then break as you don't need to cycle through all 10 cars if you only need to spawn one. I have written a better method of doing this, and a bunch of more memory effective patches throughout the entire mod that I will be giving to Itch to review and add if he wishes.  

    I don't know nothing of how scripting works as their isn't a documentation that goes in depth, although I found one in German. So for example, if I spawn 3 units, the breaking does not stop the mod from spawning the necessary volunteer's. 

  7. Hmmm..I think this is it. The loop would declare a new vehicle as it cycles. Let me know of the improvements. Such a simple piece of code was overlooked unfortunately due to the rush to release this mod back in Chrismas 2014.

    If you guys need any help in the future, I am more than happy to review any piece you guys want. I am reviewing the stop sign script as we speak.

  8. The issue you described has something to do with the map itself, and not any scripts. There might be a spawnpoint that is glitched. Another thing to look for is the StopSign and NightSounds scripts because those run all throughout the duration of gameplay, unlike the volunteer script which only runs when called. I'd recommend also looking into those.

     

    What breaks do you mean? What have you changed exactly. Your help is very appreciated and I would like to thank you for helping out in the development process.

     

    I like this mod and because I want to play for more than 5 minutes, I have spent sometime looking through issues reported here and try and fix.

    if(ChildID == 0)
    {
    if(p.HasName(NAME_PERSON01))
    {
    VehicleList vl1(NAME_CAR01);
    for(int j=0; j < vl1.GetNumVehicles(); j++)
    {
    car = vl1.GetVehicle(j);
    break;
    }
    }
    else if(p.HasName(NAME_PERSON02))
    {
    VehicleList vl2(NAME_CAR02);
    for(int j=0; j < vl2.GetNumVehicles(); j++)
    {
    car = vl2.GetVehicle(j);
    break;
    }
    }
    else if(p.HasName(NAME_PERSON03))
    {
    VehicleList vl3(NAME_CAR03);
    for(int j=0; j < vl3.GetNumVehicles(); j++)
    {
    car = vl3.GetVehicle(j);
    break;
    }
    }
    else if(p.HasName(NAME_PERSON04))
    {
    VehicleList vl4(NAME_CAR04);
    for(int j=0; j < vl4.GetNumVehicles(); j++)
    {
    car = vl4.GetVehicle(j);
    break;
    }
    }
    else if(p.HasName(NAME_PERSON05))
    {
    VehicleList vl5(NAME_CAR05);
    for(int j=0; j < vl5.GetNumVehicles(); j++)
    {
    car = vl5.GetVehicle(j);
    break;
    }
    }
    else if(p.HasName(NAME_PERSON06))
    {
    VehicleList vl6(NAME_CAR06);
    for(int j=0; j < vl6.GetNumVehicles(); j++)
    {
    car = vl6.GetVehicle(j);
    break;
    }
    }
    else if(p.HasName(NAME_PERSON07))
    {
    VehicleList vl7(NAME_CAR07);
    for(int j=0; j < vl7.GetNumVehicles(); j++)
    {
    car = vl7.GetVehicle(j);
    break;
    }
    }
    else if(p.HasName(NAME_PERSON08))
    {
    VehicleList vl8(NAME_CAR08);
    for(int j=0; j < vl8.GetNumVehicles(); j++)
    {
    car = vl8.GetVehicle(j);
    break;
    }
    }
    else if(p.HasName(NAME_PERSON09))
    {
    VehicleList vl9(NAME_CAR09);
    for(int j=0; j < vl9.GetNumVehicles(); j++)
    {
    car = vl9.GetVehicle(j);
    break;
    }
    }
    else if(p.HasName(NAME_PERSON10))
    {
    VehicleList vl10(NAME_CAR10);
    for(int j=0; j < vl10.GetNumVehicles(); j++)
    {
    car = vl10.GetVehicle(j);
    break;
    }
    }

    When it loops through the number of vehicles, it never stopped. It would continue to cycle through eating at the memory a little bit, so adding the simplistic breaks where applicable, it saved a little bit on the memory. I am going to rewrite this to be more efficient on the memory, as making it cycle through the number of vehicles every time it declares a new vehicle seems a little weird.

  9. Was the ATF issue all ready fixed or is not  factor in what is causing the game to glitch or lag?

    I have seen noticeable increase in FPS when I added the breaks, however it could just be me imagining it. I have isolated the crash(for me anyways) to this:

    ?SpawnPoint "civspawnrowhouse2": Assigned path "civpath06" is blocked.
    ?VVideoTexture::StartPlayback(): could not run graph [80070008]
    ?SpawnPoint "civspawnhouse2": Assigned path "civpath10" is blocked.
    !WARNING: global listener object is still registered! Unregister listener before destroying object!

     

    I am unsure if it has to do with the volunteer script, I have been trying to pin point the exact cause but I haven't been able to find it. It seems plausible that if the civpath is blocked it leaves it registered and picks another civpath and attempts to destroy the civpath that was blocked, which causes this error. I am still looking into it(I really dislike notepad++).

  10. Some hints. Maybe pointer variables are more efficient, so get your asterisks and -> ready. Despite having some knowledge of C programming, I don't know the effect or difference of having pointers vs regular variables in Em4, except for functions.

     

    The scripts I've made so far don't make use of functions so pointers to me didn't seem like a useful thing unless I was going to "pass" something. Another option would be to divide the command scripts further into individual functions and have them pass pointer variables instead.

     

    I am unsure if this makes it more efficient, but from what I've learned, having a single permanent variable that changes in a case to case basis is more efficient than having 10 different variables which may or may not even be used.

    So far everything is working excellent, I will continue to test a little bit more then release my fix.

  11. Hmmm...sounds like a possibilty, because it constantly declares the Vehicle variable "car" each time the loop iterates. It makes use of the same variable all through out for sake of not having to create 10 different variables. The number of VehicleLists is also another possibilty since the game has to search for the specific vehicle x number of times depending on how many persons of those are present on map.

     

    I am attempting a fix as we speak, and I will test it and report back. Keep in mind, I don't know much c++, I am more of a Java developer.

  12. There are several custom scripts running in the mod. One, you have the Stop sign script, the other is the night sound script, third is the fire hydrant script. Two of those are by bma, the hydrant is by me. Try checking those because those are the most likely suspects.

     

    In Em4, if a loop in a script such as the one you posted does not terminate, the game crashes. Stack overflow I guess.

     

    Lines: 380 -> 461 in the script: "MTVolunteerScript"

     

    if(ChildID == 0)
    {
    if(p.HasName(NAME_PERSON01))
    {
    VehicleList vl1(NAME_CAR01);
    for(int j=0; j < vl1.GetNumVehicles(); j++)
    {
    car = vl1.GetVehicle(j);
    }
    }
    else if(p.HasName(NAME_PERSON02))
    {
    VehicleList vl2(NAME_CAR02);
    for(int j=0; j < vl2.GetNumVehicles(); j++)
    {
    car = vl2.GetVehicle(j);
    }
    }
    else if(p.HasName(NAME_PERSON03))
    {
    VehicleList vl3(NAME_CAR03);
    for(int j=0; j < vl3.GetNumVehicles(); j++)
    {
    car = vl3.GetVehicle(j);
    }
    }
    else if(p.HasName(NAME_PERSON04))
    {
    VehicleList vl4(NAME_CAR04);
    for(int j=0; j < vl4.GetNumVehicles(); j++)
    {
    car = vl4.GetVehicle(j);
    }
    }
    else if(p.HasName(NAME_PERSON05))
    {
    VehicleList vl5(NAME_CAR05);
    for(int j=0; j < vl5.GetNumVehicles(); j++)
    {
    car = vl5.GetVehicle(j);
    }
    }
    else if(p.HasName(NAME_PERSON06))
    {
    VehicleList vl6(NAME_CAR06);
    for(int j=0; j < vl6.GetNumVehicles(); j++)
    {
    car = vl6.GetVehicle(j);
    }
    }
    else if(p.HasName(NAME_PERSON07))
    {
    VehicleList vl7(NAME_CAR07);
    for(int j=0; j < vl7.GetNumVehicles(); j++)
    {
    car = vl7.GetVehicle(j);
    }
    }
    else if(p.HasName(NAME_PERSON08))
    {
    VehicleList vl8(NAME_CAR08);
    for(int j=0; j < vl8.GetNumVehicles(); j++)
    {
    car = vl8.GetVehicle(j);
    }
    }
    else if(p.HasName(NAME_PERSON09))
    {
    VehicleList vl9(NAME_CAR09);
    for(int j=0; j < vl9.GetNumVehicles(); j++)
    {
    car = vl9.GetVehicle(j);
    }
    }
    else if(p.HasName(NAME_PERSON10))
    {
    VehicleList vl10(NAME_CAR10);
    for(int j=0; j < vl10.GetNumVehicles(); j++)
    {
    car = vl10.GetVehicle(j);
    }
    }
    It looks as if its continuously cycling and once the condition is met, for example car = vl10.GetVehicle(j) it doesn't break the loop. Although, I haven't looked at the memory usage during the time when this script is called, I suspect this is probably the/one of the issues.
  13. I have seen a mod where they made it where you can draft out of a lake it was a pretty cool idea and it is very easy to do. I hope someone can figure out how to do engine to engine or an engine to ladder water supply

    Their was a mod that actually had drafting? Intense! I would love to see some of these features implemented, although I know its in a city and you wouldn't necessarily need to draft from a pond, but I could see how it would be useful when you get the small forest fire event(although, I don't believe their is any lakes/ponds near by?). 

  14. This is probably one of the best mods I have used. It can be very challenging and semi-realistic. I would love to see supplying water from other resources such as from the pond and even between the attack trucks and not just from the tanker. All in all, I would rate this a 10/10 because everything about it makes the game really fun. Cheers! 

×
×
  • Create New...