Enfusion Artifical Intelligence for DayZ and future Bohemia Interactive games.

Related tags

Game eai
Overview

Enfusion AI Project (eAI)

This mod adds headless player units under the control of a script on the server. Although the script is very rudimentary now, I hope to produce an AI which is dynamic like similar mods for A3 (and DayZ on the RV engine) which could be used as hostiles, team members, or even things like bodyguards for traders or safe zone enforcers.

The mod is in a prerelease state and has no version info/changelog.

Join the discord community for updates/questions/suggestions:

https://discord.gg/hxY7a4CA7t

Current Features

  • Movement (Move to waypoint)
  • Follow Unit
  • Basic Weapon Handling

In Progress

  • Advanced Weapon Handling
  • Targeting System
  • Ballistics computation

Known Bugs

  • Possible server crash if unit tries to fire a jammed weapon
  • Script crash if reload is triggered during a weapon raise animation
  • Unit can enter an indefinite turn/walk state under certain circumstances

Wishlist Features

  • Group Behavior
  • Vehicle Control
  • Melee Behavior
Comments
  • Players Spawn With Gear Of IA

    Players Spawn With Gear Of IA

    I Have Issue in Our Server, Players Spawns With Gear Of IA :D i dont know what i Miss. this is My Init.c /**

    • init.c
    • DayZ Expansion Mod
    • www.dayzexpansion.com
    • © 2020 DayZ Expansion Mod Team
    • This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
    • To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.

    */ #include "$CurrentDir:\mpmissions\Expansion.ChernarusPlus\expansion\ExpansionObjectSpawnTools.c" #include "$CurrentDir:\mpmissions\Expansion.ChernarusPlus\expansion\missions\MissionConstructor.c"

    void main() { bool loadTraderObjects = false; bool loadTraderNPCs = false;

    string MissionWorldName = "empty";
    GetGame().GetWorldName(MissionWorldName);
    
    if (MissionWorldName != "empty")
    {
    	//! Spawn mission objects and traders
    	FindMissionFiles(MissionWorldName, loadTraderObjects, loadTraderNPCs);
    }
    
    //INIT WEATHER BEFORE ECONOMY INIT------------------------
    Weather weather = g_Game.GetWeather();
    
    weather.MissionWeather(false);	// false = use weather controller from Weather.c
    
    weather.GetOvercast().Set( Math.RandomFloatInclusive(0.02, 0.1), 1, 0);
    weather.GetRain().Set( 0, 1, 0);
    weather.GetFog().Set( 0, 1, 0);
    
    //INIT ECONOMY--------------------------------------
    Hive ce = CreateHive();
    if ( ce )
    	ce.InitOffline();
    
    //DATE RESET AFTER ECONOMY INIT-------------------------
    int year, month, day, hour, minute;
    int reset_month = 8, reset_day = 10;
    GetGame().GetWorld().GetDate(year, month, day, hour, minute);
    
    if ((month == reset_month) && (day < reset_day))
    {
    	GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
    }
    else
    {
    	if ((month == reset_month + 1) && (day > reset_day))
    	{
    		GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
    	}
    	else
    	{
    		if ((month < reset_month) || (month > reset_month + 1))
    		{
    			GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
    		}
    	}
    }
    

    }

    class CustomMission: MissionServer { // ------------------------------------------------------------ // Override OnInit // ------------------------------------------------------------ override void OnInit() { ExpansionMissionModule missionModule; if ( Class.CastTo( missionModule, GetModuleManager().GetModule( ExpansionMissionModule ) ) ) { missionModule.SetMissionConstructor( COMMissionConstructor ); }

    	super.OnInit();
    }
    
    // ------------------------------------------------------------
    // Override CreateCharacter
    // ------------------------------------------------------------
    override PlayerBase CreateCharacter(PlayerIdentity identity, vector pos, ParamsReadContext ctx, string characterName)
    {
    	Entity playerEnt;
    	playerEnt = GetGame().CreatePlayer( identity, characterName, pos, 0, "NONE" );
    	Class.CastTo( m_player, playerEnt );
    
    	GetGame().SelectPlayer( identity, m_player );
    
    	return m_player;
    }
    
    // ------------------------------------------------------------
    // SetRandomHealth
    // ------------------------------------------------------------
    void SetRandomHealth(EntityAI itemEnt)
    {
    	if ( itemEnt )
    	{
    		float rndHlt = Math.RandomFloat( 0.25, 0.65 );
    		itemEnt.SetHealth01( "", "", rndHlt );
    	}
    }
    
    // ------------------------------------------------------------
    // StartingEquipSetup
    // ------------------------------------------------------------
    override void StartingEquipSetup(PlayerBase player, bool clothesChosen)
    {
    	if ( !GetExpansionSettings().GetSpawn().StartingClothing.EnableCustomClothing )
    	{
    		EntityAI itemClothing;
    		EntityAI itemEnt;
    		ItemBase itemBs;
    		float rand;
    
    		itemClothing = player.FindAttachmentBySlotName( "Body" );
    		if ( itemClothing )
    		{
    			SetRandomHealth( itemClothing );
    			
    			itemEnt = itemClothing.GetInventory().CreateInInventory( "Rag" );
    			if ( Class.CastTo( itemBs, itemEnt ) )
    				itemBs.SetQuantity( 4 );
    
    			SetRandomHealth( itemEnt );
    
    			string chemlightArray[] = { "Chemlight_White", "Chemlight_Yellow", "Chemlight_Green", "Chemlight_Red" };
    			int rndIndex = Math.RandomInt( 0, 4 );
    			itemEnt = itemClothing.GetInventory().CreateInInventory( chemlightArray[rndIndex] );
    			SetRandomHealth( itemEnt );
    
    			rand = Math.RandomFloatInclusive( 0.0, 1.0 );
    			if ( rand < 0.35 )
    				itemEnt = player.GetInventory().CreateInInventory( "Apple" );
    			else if ( rand > 0.65 )
    				itemEnt = player.GetInventory().CreateInInventory( "Pear" );
    			else
    				itemEnt = player.GetInventory().CreateInInventory( "Plum" );
    
    			SetRandomHealth( itemEnt );
    		}
    		
    		itemClothing = player.FindAttachmentBySlotName( "Legs" );
    		if ( itemClothing )
    			SetRandomHealth( itemClothing );
    		
    		itemClothing = player.FindAttachmentBySlotName( "Feet" );
    		if ( itemClothing )
    			SetRandomHealth( itemClothing );
    	}
    }
    

    }

    Mission CreateCustomMission(string path) { return new CustomMission(); }

    opened by Mostabdel 1
  • Patrols despawn instantly

    Patrols despawn instantly

    patrols are instantly deleted as the last AI withing the patrol dies.

    my script.log file: SCRIPT : Spawning patrol at <5739.240234, 6.000000, 2137.399902> SCRIPT : HumanLoadout: $profile:eAI/PoliceLoadout.json exists, loading! SCRIPT : HumanLoadout: $profile:eAI/PoliceLoadout.json exists, loading! SCRIPT : SAVE CHECKSUM:1111958169 SCRIPT : Chernarus::Weather::Fog:: ( 18.8355 ) 0.0325123 SCRIPT : SurvivorM_Quinn:03 STS=-1 event EEKilled, player has died at STS=-1 SCRIPT : EEKilled - processing corpse SCRIPT : SAVE CHECKSUM:1111958169 SCRIPT : SurvivorM_Niki:02 STS=-1 event EEKilled, player has died at STS=-1 SCRIPT : EEKilled - processing corpse SCRIPT : Chernarus::Weather::Rain::ForceEnd:: ( 18.9471 ) 0 -> 0 SCRIPT : Deleted patrol at <5739.240234, 6.000000, 2137.399902>

    opened by Defender0518 1
  • HumanLoadout rename. Handgun support for loadout.

    HumanLoadout rename. Handgun support for loadout.

    The loadout loading has more error checking and also version information. The log will have an error in case the version information is incorrect. The default storage is now profile\eAI\Loadout. I added the dir creation to MissionServer().

    opened by mokdevel 0
  • is there a way to enable all the states/factions ?

    is there a way to enable all the states/factions ?

    Hi is there a way to enable all 3 factions at once and set them acordingly to each patrol ? like patrol_1 is raider bcs they are in theyre "base" and defend that. and patrol_2 guards like around traders and such. If there is a way and im just to stupid to find it, pls let me know.

    opened by HappLord 0
  • Update Dayz  to 1.18 / Expansion 1.6.74 -crash eAI

    Update Dayz to 1.18 / Expansion 1.6.74 -crash eAI

    eAI worked fine before the update 1.18.... Update Dayz 14.06.22 to 1.18 / Expansion 1.6.74 -crash server. SCRIPT (W): @"eAI/Scripts/4_World/eai\entities\weapon_base.c,175": Unsafe down-casting, use 'EntityAI.Cast' for safe down-casting SCRIPT (W): @"eAI/Scripts/4_World/eai\eaiimplementaiming.c,32": No need to use 'Cast' for up-casting SCRIPT (W): @"eAI/Scripts/4_World/eai\entities\eaibase.c,290": Unsafe down-casting, use 'EntityAI.Cast' for safe down-casting SCRIPT (E): @"DayZExpansion/Core/Scripts/4_World/dayzexpansion_core\expansionobjectspawntools.c,425": Unknown type 'eAIGame' SCRIPT (E): @"DayZExpansion/Core/Scripts/4_World/dayzexpansion_core\expansionobjectspawntools.c,425": Unknown type 'eAIGame'

    When excluding start.bat from the mod @eAI, I got this error report: SCRIPT (E): @"$CurrentDir:/mpmissions/dayzOffline.chernarusplus/eAI/AI_init.c,208": Unknown type 'eAIDynamicPatrol' SCRIPT (E): @"$CurrentDir:/mpmissions/dayzOffline.chernarusplus/eAI/AI_init.c,439": Unknown type 'eAIDynamicPatrol' SCRIPT (E): @"$CurrentDir:/mpmissions/dayzOffline.chernarusplus/eAI/AI_init.c,439": Wrong number of template parameters SCRIPT (E): Can't compile mission init script'! $CurrentDir:/mpmissions/dayzOffline.chernarusplus/eAI/AI_init.c(208): Unknown type 'eAIDynamicPatrol' ......need to be corrected and ini.c //#include "$CurrentDir:/mpmissions/dayzOffline.chernarusplus/eAI/AI_init.c" //InitDynamicPatrols();

    -the mod is completely off, the server is UP

    opened by VetalVoit 3
  • AI Does not shoot

    AI Does not shoot

    Sorry I'm using a translator. :( The problem is, the patrol has established that they shoot me on the ground, and they lose me on top of the car. how can this be fixed ?

    opened by Custom41k 0
  • Audio sporadically stops working for gunshots fired from AI

    Audio sporadically stops working for gunshots fired from AI

    on occasion, the audio for the actual gunfire from weapons carried by the AI ceases to work. Impact sounds from their rounds can still be heard, but the sound of the actual gunshot sometimes doesn't. Only way I have found to fix it is to relog.

    opened by Starfury1985 0
Releases(004)
Owner
William Bowers
International man of mystery.
William Bowers
This is a list of different open-source video games and commercial video games open-source remakes.

This is a list of different open-source video games and commercial video games open-source remakes.

Ivan Bobev 173 Jan 2, 2023
GammaGo is an interactive go game system that integrates image recognition with robot arm control.

Introduction GammaGo is an interactive go game system that integrates image recognition with robot arm control. This repository contains all the neces

Jin Zihang 5 Jul 31, 2022
A simple C++ program for an interactive Tic Tac Toe Game.

CSE 332 Lab 3:Tic-Tac-Toe Game Objective: This lab is intended to extend your use of basic C++ language features from the previous labs, and to give y

Julia Grandury 1 Nov 8, 2021
OGRE is a scene-oriented, flexible 3D engine written in C++ designed to make it easier and more intuitive for developers to produce games and demos utilising 3D hardware.

OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented, flexible 3D engine written in C++ designed to make it easier and more intuitive for developers to produce games and demos utilising 3D hardware. The class library abstracts all the details of using the underlying system libraries like Direct3D and OpenGL and provides an interface based on world objects and other intuitive classes.

null 3.1k Jan 3, 2023
A multi core friendly rigid body physics and collision detection library suitable for games and VR applications.

Jolt Physics Library A multi core friendly rigid body physics and collision detection library suitable for games and VR applications. A YouTube video

null 2.5k Dec 31, 2022
Distributed server for social and realtime games and apps.

Distributed server for social and realtime games and apps. Features Users - Register/login new users via social networks, email, or device ID. Storage

Heroic Labs 6.6k Jan 1, 2023
3D games console based on RP2040 and iCE40 UP5k

PicoStation 3D This is an unfinished, untested project to develop a 3D games console based on an RP2040 microcontroller and an iCE40 UP5k FPGA. Quick

Luke Wren 37 Sep 12, 2022
A set of libraries and tools to make MSX games using the C programming language.

ubox MSX lib This is a set of libraries and tools to make MSX games using the C programming language. There are three main components: ubox: thin wrap

Juan J. Martínez 42 May 30, 2022
TIC-80 is a fantasy computer for making, playing and sharing tiny games.

TIC-80 is a fantasy computer for making, playing and sharing tiny games.

Vadim Grigoruk 3.8k Jan 4, 2023
Game engine behind Sea Dogs, Pirates of the Caribbean and Age of Pirates games.

Game engine behind Sea Dogs, Pirates of the Caribbean and Age of Pirates games.

Storm Devs 693 Dec 29, 2022
Project DELTA - An open-source trainer built on the Void Engine for Toby Fox's games and their spin-offs.

Project DELTA v3 Project DELTA - An open-source, modular mod menu for Toby Fox's games and their spin-offs. Important note to Grossley: Yes, it is out

Archie 8 Oct 15, 2022
Graphical improvements mod for Hyperdimension Neptunia Re;Birth1, Re;Birth2 and Re;Birth3 games.

Neptastic Mod Graphical improvements mod for Hyperdimension Neptunia Re;Birth1, Re;Birth2 and Re;Birth3 games. Features: Resolution upscaling and down

tlaik 35 Nov 7, 2022
Dragon's Dice Roller aims to be a lightweight, simple, reliable and easy-to-use dice roller for RPG games.

Dragon's Dice Roller is the first and (so far the only) open source RPG dice roller written in C available on GitHub. It aims to be a lightweight, simple, reliable and easy-to-use dice roller for any kind of role-playing game.

Michael Kolesidis 10 Apr 22, 2022
YYToolkit is a tool for creating mods and altering GameMaker games.

YYToolkit is a tool for creating mods and altering GameMaker games.

Archie 33 Dec 9, 2022
GRawInput is a modification for games "Gothic" and "Gothic 2"

GRawInput GRawInput is a modification for games "Gothic" and "Gothic 2" that change old deprecated DirectX7 Direct Input Keyboard and Mouse interface

Jakub 7 Nov 21, 2022
A CTRPF plugin for the Nintendo 3DS Pokémon games in which, supports both the 6th and 7th generations.

Multi-Pokémon Framework Multi-Pokémon Framework is a Pokémon plugin developed by Jared0714 that is based off of Nanquitas' CTRPluginFramework. This pl

null 24 Dec 13, 2022
An Unreal Engine 4 silent aim method, not usable on all games. Tested on Fortnite, Rogue Company, Bloodhunt, and Splitgate.

UE4-Silent-Aim An Unreal Engine 4 silent aim method, not usable on all games. Only tested on Fortnite, Rogue Company, Bloodhunt, and Splitgate. Done t

null 50 Dec 25, 2022
Dedicated Game Server Hosting and Scaling for Multiplayer Games on Kubernetes

Agones is a library for hosting, running and scaling dedicated game servers on Kubernetes. Agones, is derived from the Greek word agōn which roughly t

GoogleForGames 5k Jan 4, 2023
This is netvars, interfaces and class ids dump from Valve's Source2 Engine games

About this This is netvars, interfaces and class ids dump from Valve's Source2 Engine games: Artifact Classic Artifact Foundry Dota 2 Dota Underlords

Dmitry 11 Nov 20, 2022